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

kvserver: address migration concern with node liveness #54216

Merged
merged 1 commit into from
Sep 11, 2020

Commits on Sep 11, 2020

  1. kvserver: address migration concern with node liveness

    In cockroachdb#53842 we introduced a change to always persist a liveness record on
    start up. As part of that change, we refactored how the liveness
    heartbeat codepath dealt with missing liveness records: it knew to fetch
    it from KV given we were now maintaining the invariant that it would
    always be present. Except that wasn't necessarily true, as demonstrated
    by the following scenario:
    
    ```
    // - v20.1 node gets added to v20.1 cluster, and is quickly removed
    //   before being able to persist its liveness record.
    // - The cluster is upgraded to v20.2.
    // - The node from earlier is rolled into v20.2, and re-added to the
    //   cluster.
    // - It's never able to successfully heartbeat (it didn't join
    //   through the join rpc, bootstrap, or gossip). Welp.
    ```
    Though admittedly unlikely, we should handle it all the same instead of
    simply erroring out. We'll just fall back to creating the liveness
    record in-place as we did in v20.1 code. We can remove this fallback in
    21.1 code.
    
    Release note: None
    irfansharif committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    b394338 View commit details
    Browse the repository at this point in the history