Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.5] etcdserver: call the OnPreCommitUnsafe in unsafeCommit #14733

Merged
merged 1 commit into from Nov 14, 2022

Commits on Nov 11, 2022

  1. etcdserver: call the OnPreCommitUnsafe in unsafeCommit

    `unsafeCommit` is called by both `(*batchTxBuffered) commit` and
    `(*backend) defrag`. When users perform the defragmentation
    operation, etcd doesn't update the consistent index. If etcd
    crashes(e.g. panicking) in the process for whatever reason, then
    etcd replays the WAL entries starting from the latest snapshot,
    accordingly it may re-apply entries which might have already been
    applied, eventually the revision isn't consistent with other members.
    
    Refer to discussion in etcd-io#14685
    
    Signed-off-by: Benjamin Wang <wachao@vmware.com>
    ahrtr committed Nov 11, 2022
    Copy the full SHA
    563713e View commit details
    Browse the repository at this point in the history