-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#20321] docdb: Fix move transaction status RPC cleanup race with yb:…
…:Transaction destructor Summary: It is currently possible for move transaction status RPC to finish after `yb::Transaction` destructs, because the handler only uses a weak_ptr. In this case, we do not clean up the RPC handle, because we no longer have access to the `Rpcs` object or the handle. This causes promotion tests that run into this case to occasionally timeout, because the `Rpcs::Abort` call in the `yb::Transaction` destructor waits for the move transaction status RPCs to be unregistered, but this never happens since the weak_ptr lock fails (due to having entered the destructor). This diff changes the move transaction status code path to maintain strong references to the transaction object instead, so that the RPC cleanup can happen. Jira: DB-9305 Test Plan: Jenkins. Also ran GeoTransactionsPromotionTest.TestPromotionReturningToAbortedState 500x and ensured timeout did not happen. Reviewers: sergei Reviewed By: sergei Subscribers: rthallam, ybase Differential Revision: https://phorge.dev.yugabyte.com/D38792
- Loading branch information
Showing
1 changed file
with
26 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters