Skip to content

Commit

Permalink
rebased, code format
Browse files Browse the repository at this point in the history
  • Loading branch information
critical27 committed Jan 28, 2022
1 parent a12d8f2 commit 8bd66d2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/kvstore/raftex/RaftPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,19 @@ folly::Future<nebula::cpp2::ErrorCode> RaftPart::appendLogAsync(ClusterID source
// until majority accept the logs, the leadership changes, or
// the partition stops
VLOG(4) << idStr_ << "Calling appendLogsInternal()";
AppendLogsIterator it(firstId,
termId,
std::move(swappedOutLogs),
[this](AtomicOp opCB) -> folly::Optional<std::string> {
CHECK(opCB != nullptr);
auto opRet = opCB();
if (!opRet.hasValue()) {
// Failed
sendingPromise_.setOneSingleValue(
nebula::cpp2::ErrorCode::E_RAFT_ATOMIC_OP_FAILED);
}
return opRet;
});
AppendLogsIterator it(
firstId,
termId,
std::move(swappedOutLogs),
[this](AtomicOp opCB) -> folly::Optional<std::string> {
CHECK(opCB != nullptr);
auto opRet = opCB();
if (!opRet.hasValue()) {
// Failed
sendingPromise_.setOneSingleValue(nebula::cpp2::ErrorCode::E_RAFT_ATOMIC_OP_FAILED);
}
return opRet;
});
appendLogsInternal(std::move(it), termId);

return retFuture;
Expand Down

0 comments on commit 8bd66d2

Please sign in to comment.