forked from yugabyte/yugabyte-db
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[yugabyte#13659] DocDB: Fix Prepare for the failed transaction
Summary: YBTransaction starts with looking up for status tablet. When this lookup is failed the transaction is marked as failed. We lack failure state check at Prepare, so calling Prepare after transaction failure will result in adding callback to waiters list. But no more action will be taken, so callback will never be notified. The side effect is master leader restarts can cause prepared statement connections to hang. This diff fixed the issue by checking failure status in Prepare. Test Plan: Launch AWS cluster. Run the following workload against it: java -jar yb-sample-apps.jar --workload SqlDataLoad --num_writes -1 --num_threads_write 5 --num_threads_read 0 --num_reads 0 --num_unique_keys 100000000000 --batch_size 774 --num_value_columns 8 --nodes $NODES Wait 10 minutes. Stop node, that runs master leader, using AWS console. W/o the fix there will be stuck queries. Reviewers: esheng, rthallam Reviewed By: esheng, rthallam Subscribers: rthallam, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D18994
- Loading branch information
Showing
5 changed files
with
18 additions
and
19 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
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
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
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
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