-
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.
[#13358] YSQL: DDL Atomicity Part 2 - YSQL reports DDL transaction st…
…atus to YB-Master Summary: In Part-1, for DDL operations that change the DocDB schema, YB-Master asynchronously polls the transaction status tablet to fetch the status of those DDL transactions. Once the transaction is determined to have completed, Yb-Master performs the relatively expensive operation of comparing the DocDB schema and PG schema to determine whether the transaction was a success to know whether to roll-back the DocDB changes. This behavior is optimized in this patch, wherein at the end of the transaction, YSQL sends the status of the transaction to YB-Master. This way YB-Master can stop polling the transaction status tablet and also skip the relatively expensive schema comparison. If the YSQL backend crashes or is unable to send the status of the transaction to YB-Master, it will still fall-back to the behavior of Part-1 and compare the DocDB and PG schema to know whether the transaction succeeded or failed. **Flags** The above behavior can be controlled by the runtime safe TServer flag **report_ysql_ddl_txn_status_to_master**. It is turned off for now as ysql_ddl_rollback enabled is false Test Plan: ybd --cxx-test pg_ddl_atomicity Reviewers: nicolas, myang, dmitry Reviewed By: myang, dmitry Subscribers: lnguyen, yql, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D18915
- Loading branch information
Showing
30 changed files
with
633 additions
and
243 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
Oops, something went wrong.