Summary:
Under write pipelining, the transaction commit RPC deadline was computed
as Now() + transaction_rpc_timeout_ms at the start of the commit path,
before waiting for the pipelined async writes to drain. A slow drain
could exhaust the deadline before the UpdateTransaction RPC was even
issued, producing "passed its deadline" commit errors on hot tablets.
Moving the deadline computation into Impl::Commit, immediately after the
async-write drain gate (which re-enters Impl::Commit once the writes
drain).
Also removing the early AdjustDeadline wrappers from the Commit and
CommitFuture entry points. This is done so that they don't fill in
the deadline before the drain occurs.
Explicit caller deadlines are unaffected, since AdjustDeadline uses
what they have set.
Non-pipelined commits don't wait on the drain so will now set their
deadline very slightly later now (after the drain step is skipped,
instead of at Commit/CommitFuture call). This is effectively the same
time, so there shouldn't be any changes.
Also have YBA set transaction_rpc_timeout_ms=7500 for multi-region
universes, consistent with the other timing flags (raft_heartbeat_
interval_ms, leader_lease_duration_ms, leader_failure_max_missed_
heartbeat_periods).
Test Plan: jenkins
Reviewers: hsunder
Reviewed By: hsunder
Subscribers: svc_phabricator, ybase, yql, yugaware
Differential Revision: https://phorge.dev.yugabyte.com/D55197