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

release-21.1: kvserver: synchronize replica removal with read-write requests #64598

Merged

Commits on May 12, 2021

  1. kvserver: synchronize replica removal with read-write requests

    Replica removal did not synchronize with in-flight read-write requests,
    which could cause them to be evaluated on a removed (empty) replica. The
    request would not be able to persist any writes, since it's unable to
    submit Raft proposals. However, it can affect conditional writes, for
    example causing a `ConditionalPutRequest` to error because it finds a
    missing value instead of the expected one.
    
    This patch fixes the problem by taking out `Replica.readOnlyCmdMu`
    during pre-Raft evaluation, to synchronize with replica removal. This
    can cause such requests to return `AmbiguousResultError` as the write is
    evaluated.
    
    Release note (bug fix): Fixed a race condition where read-write requests
    during replica removal (e.g. during range merges or rebalancing) could
    be evaluated on the removed replica. These will not have been able to
    write any data to persistent storage, but could behave unexpectedly,
    e.g. returning errors that they should not have returned.
    erikgrinaker committed May 12, 2021
    Configuration menu
    Copy the full SHA
    ef4a7b5 View commit details
    Browse the repository at this point in the history