-
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.
[#19359] DocDB: Do not remove large transactions that are still apply…
…ing intents during bootstrap Summary: Consider the following scenario: - A large transaction gets started, intents are written written, the transaction is gets committed. (A large transaction is one that has more than txn_max_apply_batch_records intents.) - A tablet starts but does not finish applying the intents of the transaction, and writes an apply state into regular RocksDB. - None of the WAL records of the transaction on the tablet are flushed to intents DB yet. - The regular RocksDB has flushed recently enough so that its flushed op id is >= the op id of the UPDATE_TRANSACTION_OP (APPLYING status) record of the transaction. - Tablet server restarts. - During bootstrap, we see that the UPDATE_TRANSACTION_OP has already been applied to RocksDB, based on its op id and the flushed op id of regular RocksDB, but we ignore its apply state in regular DB, and the transaction gets cleaned up. As a result, only part of the transaction's data ends up in the regular RocksDB. To fix this bug, we modify TransactionParticipant's Add method to check if there is a pending apply record for the transaction in the loader, and initialize the same information (local commit data and apply data) as is already being done in LoadTransaction. Other changes: - Using _WITH_PREFIX versions of logging macros in ShouldReplayOperation in tablet bootstrap. - Refactoring and simplifying single-node test base class in pg_wrapper-test. - To facilitate the test scenario needed by this fix, add a regular_only flag to the flush/compaction RPC to flush only regular RocksDB. Test Plan: Jenkins Reviewers: timur, sergei Reviewed By: timur Subscribers: yql, ybase, bogdan Differential Revision: https://phorge.dev.yugabyte.com/D29000
- Loading branch information
Showing
25 changed files
with
353 additions
and
150 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
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
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
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
Oops, something went wrong.