Skip to content
Snippets Groups Projects
Unverified Commit 0766f2b2 authored by cpw's avatar cpw Committed by GitHub
Browse files

Return partial succeeded. (#851)

parent 2419f28b
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,11 @@ public:
return symTable_.get();
}
void setPartialSuccess() {
DCHECK(rctx_ != nullptr);
rctx_->resp().errorCode = ErrorCode::E_PARTIAL_SUCCEEDED;
}
private:
void init();
......
......@@ -7,8 +7,9 @@
#ifndef EXECUTOR_STORAGEACCESSEXECUTOR_H_
#define EXECUTOR_STORAGEACCESSEXECUTOR_H_
#include "executor/Executor.h"
#include "common/clients/storage/StorageClientBase.h"
#include "context/QueryContext.h"
#include "executor/Executor.h"
namespace nebula {
namespace graph {
......@@ -44,6 +45,7 @@ protected:
return Status::Error("Request to storage failed, without failedCodes.");
}
// partial success is accepted
qctx()->setPartialSuccess();
return Result::State::kPartialSuccess;
}
return Result::State::kSuccess;
......
......@@ -125,6 +125,8 @@ const char* GraphService::getErrorStr(ErrorCode result) {
return "User not found";
case ErrorCode::E_TOO_MANY_CONNECTIONS:
return "Too many connections";
case ErrorCode::E_PARTIAL_SUCCEEDED:
return "Partial results";
}
/**********************
* Unknown error
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment