Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Dec 24, 2024
1 parent ea4c6c8 commit 7976e87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ TMessageHolder<TAppendEntriesRequest> TRaft::CreateAppendEntries(uint32_t nodeId
mes.InitPayload(lastIndex - prevIndex);
uint32_t j = 0;
for (auto i = prevIndex; i < lastIndex; i++) {
mes.Payload[j++] = std::static_pointer_cast<TState>(State)->Log[i]; // TODO: fixme
mes.Payload[j++] = State->Get(i);
}
}
return mes;
Expand Down Expand Up @@ -385,7 +385,7 @@ void TRaft::Process(ITimeSource::Time now, TMessageHolder<TMessage> message, con
void TRaft::ProcessCommitted() {
auto commitIndex = VolatileState->CommitIndex;
for (auto i = VolatileState->LastApplied+1; i <= commitIndex; i++) {
Rsm->Write(std::static_pointer_cast<TState>(State)->Log[i-1], i); // TODO: fixme
Rsm->Write(State->Get(i-1), i);
}
VolatileState->LastApplied = commitIndex;
}
Expand Down

0 comments on commit 7976e87

Please sign in to comment.