Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Dec 26, 2024
1 parent 8eb96b4 commit 6bacab0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/raft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ void TRequestProcessor::OnCommandRequest(TMessageHolder<TCommandRequest> command
// read request
if (! (command->Flags & TCommandRequest::EWrite)) {
if (replyTo) {
// TODO: possible stale read, should use max(LastIndex, LeaderLastIndex)
assert(Waiting.empty() || Waiting.back().Index <= Raft->GetLastIndex());
Waiting.emplace(TWaiting{Raft->GetLastIndex(), std::move(command), replyTo});
}
Expand Down

0 comments on commit 6bacab0

Please sign in to comment.