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

[DNM] storage/concurrency: introduce concurrency control package, prototype SFU #43775

Commits on Jan 28, 2020

  1. sql: propagate row-level locking modes through execbuilder to row.Fet…

    …cher
    
    Relates to cockroachdb#40205.
    
    This commit is a follow-up to cockroachdb#44015. It propagates the row-level locking modes
    from the optbuilder all the way down to the row.Fetcher. This requires passing
    the locking information through the execbuilder and then through DistSQL. The
    commit leaves off at the point where `roachpb.ScanRequest`s are constructed.
    
    I couldn't find a good way to test this. It's possible I missed something and
    would love any tips, but I think we may need to wait until the plumbing into
    the KV API is complete before performing end-to-end tests.
    
    The next step will be to hook the locking modes into the KV API.
    
    Release note: None
    nvanbenschoten committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    7261e5d View commit details
    Browse the repository at this point in the history
  2. [DNM] storage/result: add UpdatedIntents and ResolvedIntents to Local…

    …Result
    
    This allows the handling of added, updated, and resolved intents to
    become more reactive. It mirrors our handling of UpdatedTxns and their
    interaction with the TxnWaitQueue.
    nvanbenschoten committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    1cbcb78 View commit details
    Browse the repository at this point in the history
  3. [DNM] storage/concurrency: introduce concurrency control package, pro…

    …totype SFU
    
    Informs cockroachdb#41720.
    
    This commit creates a new concurrency package that provides a concurrency
    manager structure that encapsulates the details of concurrency control and
    contention handling for serializable key-value transactions. Any reader of this
    commit should start at `concurrency_control.go` and move out from there.
    
    The new package has a few primary objectives:
    1. centralize the handling of request synchronization and transaction contention
       handling in a single location, allowing for the topic to be documented and
       understood in isolation.
    2. rework contention handling to react to intent state transitions directly. This
       simplifies the transaction queueing story, reduces the frequency of transaction
       push RPCs, and allows waiters to proceed after intent resolution as soon as possible.
    3. create a framework that naturally permits "update" locking, which is required for
       kv-level SELECT FOR UPDATE support (cockroachdb#6583).
    4. provide stronger guarantees around fairness when transactions conflict, in order
       to reduce tail latencies under contended scenarios.
    5. create a structure that can extend to address the long-term goals of a fully
       centralized lock-table laid out in cockroachdb#41720.
    
    WARNING: this is still a WIP. Notably, the lockTableImpl is mocked out with a
    working but incomplete implementation. See cockroachdb#43740 for a more complete strawman.
    
    Release note: None
    nvanbenschoten committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    7ada06b View commit details
    Browse the repository at this point in the history
  4. [DNM] sql/storage/workload: prototype SELECT FOR UPDATE

    This commit hacks in upgrade locking into ScanRequests and uses it in YCSB.
    nvanbenschoten committed Jan 28, 2020
    Configuration menu
    Copy the full SHA
    4a8e8dc View commit details
    Browse the repository at this point in the history