Closed atlesn closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 74.09%. Comparing base (
dd383c5
) to head (9d911c1
). Report is 2 commits behind head on main.:exclamation: Current head 9d911c1 differs from pull request most recent head 09448e2. Consider uploading reports for the commit 09448e2 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
There are a few rejection paths, do you know exactly which path we're talking about?
It seems that https://github.com/cowsql/raft/blob/9edb176a7924ce2b943cb56552366dc4b5a1a6b7/src/recv_append_entries.c#L44 indeed jumps to the reply
label without setting last_log_index
, but I'm not sure if there are other paths. If that's the only path, I'd probably suggest to set it there only. That would have the benefit that we don't accidentally mask other cases where we expect that value to be set, but in fact is not.
I think it's only in the goto reply-case. I moved the initialization to inside the if-statement.
I think it's only in the goto reply-case. I moved the initialization to inside the if-statement.
Thanks.
In rejection pathways when receiving append entries or install snapshot frames, the
last_log_index
field of the internal representation of the append entries result frame was not set. This uninitialized value was then written to the encoding buffer for outgoing append entries result frame and sent out.