-
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.
[#23120] YSQL: Do not wait for a safe snapshot in serializable read o…
…nly deferrable mode. Summary: PostgreSQL uses SSI to implement serializable isolation level. Read only serializable isolation transactions may abort other serializable transactions by creating a cycle in the transaction dependency graph. This can be avoided by waiting for all concurrent transactions to finish by using the READ ONLY DEFERRABLE mode. On the other hand, YugabyteDB does not use SSI for serializable transactions and uses 2-phase locking instead. And YB assigns a different meaning to the DEFERRABLE mode for READ ONLY serializable transactions as compared to Pg. In YB, DEFERRABLE READ ONLY transactions wait out the maximum possible clock skew to avoid read restart errors (see https://docs.yugabyte.com/preview/architecture/transactions/read-restart-error/). So, in YB's use of DEFERRABLE, there is no need to wait for concurrent transactions to complete, apart from waiting out the max_clock_skew_usec. Jira: DB-12053 Test Plan: Jenkins ``` ./yb_build.sh --java-test TestPgRegressWaitQueues ``` There are tests already in modify-transaction-characteristics that use a read only deferrable transaction for a select statement. Modified the test output to remove waiting. Reviewers: pjain, bkolagani, smishra Reviewed By: pjain Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D36671
- Loading branch information
Showing
2 changed files
with
59 additions
and
49 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