Skip to content

Commit

Permalink
resume failed may not del prime
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyu85cn committed Oct 12, 2021
1 parent 9caed7e commit 030e5a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/storage/transaction/ChainAddEdgesProcessorLocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ folly::SemiFuture<Code> ChainAddEdgesProcessorLocal::forwardToDelegateProcessor(
if (rc == Code::SUCCEEDED) {
if (FLAGS_trace_toss) {
for (auto& k : kvErased_) {
VLOG(1) << uuid_ << "erase prime " << folly::hexlify(k);
VLOG(1) << uuid_ << " erase prime " << folly::hexlify(k);
}
}
} else {
Expand Down
8 changes: 2 additions & 6 deletions src/storage/transaction/ResumeAddEdgeProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ folly::SemiFuture<Code> ResumeAddEdgeProcessor::processLocal(Code code) {
return Code::E_OUTDATED_TERM;
}

if (!checkVersion(req_)) {
LOG(WARNING) << this << "E_OUTDATED_EDGE";
return Code::E_OUTDATED_EDGE;
}

if (code == Code::E_RPC_FAILURE) {
kvAppend_ = ChainAddEdgesProcessorLocal::makeDoublePrime();
}
Expand All @@ -66,7 +61,8 @@ folly::SemiFuture<Code> ResumeAddEdgeProcessor::processLocal(Code code) {
// if there are something wrong other than rpc failure
// we need to keep the resume retry(by not remove those prime key)
erasePrime();
return ChainAddEdgesProcessorLocal::forwardToDelegateProcessor();
code_ = forwardToDelegateProcessor().get();
return code_;
}

return code;
Expand Down
3 changes: 2 additions & 1 deletion src/storage/transaction/ResumeAddEdgeRemoteProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ folly::SemiFuture<Code> ResumeAddEdgeRemoteProcessor::processLocal(Code code) {
// if there are something wrong other than rpc failure
// we need to keep the resume retry(by not remove those prime key)
ChainAddEdgesProcessorLocal::eraseDoublePrime();
return forwardToDelegateProcessor();
code_ = forwardToDelegateProcessor().get();
return code_;
}

return code;
Expand Down

0 comments on commit 030e5a9

Please sign in to comment.