Skip to content

Commit

Permalink
Fix commit index
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Nov 26, 2023
1 parent d25c749 commit a68f63e
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 @@ -344,6 +344,7 @@ std::unique_ptr<TResult> TRaft::Leader(ITimeSource::Time now, TMessageHolder<TMe
auto dataSize = command->Len - sizeof(TCommandRequest);
auto entry = NewHoldedMessage<TLogEntry>(sizeof(TLogEntry)+dataSize);
memcpy(entry->Data, command->Data, dataSize);
entry->Term = State->CurrentTerm;
log.push_back(entry);
auto nextState = std::make_unique<TState>(TState {
.CurrentTerm = State->CurrentTerm,
Expand Down

0 comments on commit a68f63e

Please sign in to comment.