[dst] Prefer push-based mechanism for signaling waiting transactions #13578
Labels
area/docdb
YugabyteDB core features
kind/enhancement
This is an enhancement of an existing feature
priority/medium
Medium priority issue
Projects
Jira Link: DB-3157
Any waiting transaction blocked in the WaitQueue will be unblocked as soon as the WaitQueue detects that it's blockers have been resolved. We currently rely on a pull-based mechanism where we poll the TransactionStatusManager on a regular basis. The TransactionStatusManager may (and usually does) trigger an RPC to the status tablet to check this transaction's status.
While we may want to maintain this poll-based mechanism as a safeguard, we should rely primarily on a push-based mechanism, where as soon as a local RunningTransaction instance is signaled of a new transaction status, the relevant WaitQueues are also signaled. Then we could also bump up the polling interval of the WaitQueue's pull-based resolution mechanism.
See: https://github.com/yugabyte/yugabyte-db/blob/master/src/yb/docdb/wait_queue.cc#L228
Note: we should be careful about which thread we use to resume conflict resolution for any unblocked waiters in this case, and ensure we're not deferring high-priority work in favor of re-running conflict resolution for waiting transactions. See also: #13580
The text was updated successfully, but these errors were encountered: