Skip to content

raft: update prevHardSt on Ready accept, not advance#14539

Merged
ahrtr merged 1 commit intoetcd-io:mainfrom
nvb:nvanbenschoten/advanceHardState
Sep 30, 2022
Merged

raft: update prevHardSt on Ready accept, not advance#14539
ahrtr merged 1 commit intoetcd-io:mainfrom
nvb:nvanbenschoten/advanceHardState

Conversation

@nvb
Copy link
Copy Markdown
Contributor

@nvb nvb commented Sep 29, 2022

This commit updates the RawNode's prevHardSt to the new HardState in acceptReady instead of on Advance. This aligns the handling of prevHardSt with that of prevSoftSt (and other fields like msgs) and simplifies the logic in Advance.

cc. @tbg

This commit updates the `RawNode`'s `prevHardSt` to the new HardState in
`acceptReady` instead of on `Advance`. This aligns the handling of
`prevHardSt` with that of `prevSoftSt` (and other fields like `msgs`)
and simplifies the logic in `Advance`.

Signed-off-by: Nathan VanBenschoten <nvanbenschoten@gmail.com>
@nvb nvb force-pushed the nvanbenschoten/advanceHardState branch from e4a0485 to 9a03632 Compare September 29, 2022 16:33
@codecov-commenter

This comment was marked as resolved.

Copy link
Copy Markdown
Contributor

@tbg tbg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Copy Markdown
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you @nvanbenschoten

@ahrtr ahrtr merged commit a932fb5 into etcd-io:main Sep 30, 2022
@tbg tbg mentioned this pull request Oct 12, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants