Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: queue requests to push txn / resolve intents on single keys
Previously, high contention on a single key would cause every thread to push the same conflicting transaction then resolve the same intent in parallel. This is inefficient as only one pusher needs to succeed, and only one resolver needs to resolve the intent, and then only one writer should proceed while the other readers/writers should in turn wait on the previous writer by pushing its transaction. This effectively serializes the conflicting reader/writers. One complication is that all pushers which may have a valid, writing transaction (i.e., `Transaction.Key != nil`), must push either the conflicting transaction or another transaction already pushing that transaction. This allows dependency cycles to be discovered.
- Loading branch information