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

kv: handle future-time operations for conflict resolution requests #59693

Merged

Commits on Feb 12, 2021

  1. kv: move endCmds to replica_send.go

    Addresses a TODO.
    nvanbenschoten committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    bb3e3d0 View commit details
    Browse the repository at this point in the history
  2. kv: handle future-time operations for conflict resolution requests

    Relates to cockroachdb#57688.
    
    This commit updates the following four requests types to properly handle
    future-time operations:
    - `PushTxnRequest`
    - `QueryTxnRequest`
    - `QueryIntentRequest`
    - `RecoverTxnRequest`
    
    It also updates the request evaluation code to properly check that all
    timestamp cache updates are safe, based on the batch header timestamps
    of the requests. The next commit will be adding a more strict assertion
    about proper timestamp cache use, so it's better that we catch these
    violations early.
    
    In doing so, the commit also updates the replica lease check to test
    against the batch's read or write timestamp, whichever is later. This
    addresses the concerns raised in cockroachdb#58904 (review).
    nvanbenschoten committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    23263a3 View commit details
    Browse the repository at this point in the history
  3. kv: check timestamp cache updates against active lease

    This commit improves an existing (race-only) assertion to not only check
    timestamp cache updates against the current HLC clock, but to also do so
    against the lease that the request performing the update is evaluating
    under. This ensures that timestamp cache updates are not lost during
    non-cooperative lease change.
    nvanbenschoten committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    218a5a3 View commit details
    Browse the repository at this point in the history
  4. kv/batcheval: use errors.AssertionFailedf where appropriate

    This commit replaces a number of calls to `errors.Errorf` with calls to
    `errors.AssertionFailedf` in request evaluation logic.
    nvanbenschoten committed Feb 12, 2021
    Configuration menu
    Copy the full SHA
    b15e3dd View commit details
    Browse the repository at this point in the history