-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skipping transaction API cause delete row fail to find key
Upstream commit ID: facebook/mysql-5.6@6bd68a8 PS-8951: Merge percona-202305 (https://jira.percona.com/browse/PS-8951) Summary: When replica use skip transaction API(rpl_skip_tx_api=1) and try to delete a row with unique key, It will fail with key not found error and cause replication break. From code, ha_rocksdb::delete_row() call ha_rocksdb::get_for_update() to check uniqueness. the key slice passed in ha_rocksdb::get_for_update() doesn't include extended fields and myrocks unique key stored in rocksdb always contain extended fields, rocksdb couldn't find the key without extended fields. The delete row will pass if using transaction API, since in transaction API, if value parameter in get_for_update() is nullptr, skip get its value(see https://github.com/facebook/rocksdb/blob/main/utilities/transactions/transaction_base.cc#L309). The change is to following transaction API behavior, skip call get its value if value parameter in get_for_update() is nullptr. Differential Revision: D47338818 fbshipit-source-id: 8f953f4a899213a0367bb7afbc22b2744e127c4f
- Loading branch information
Showing
3 changed files
with
21 additions
and
7 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