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#16441] YSQL: Retry CREATE DATABASE when oid collision happens
Summary: OID collision is one general issue for YSQL. In vanilla PG, OIDs are assigned by a cluster-wide counter. However, for YSQL, we allocate OIDs in a bit weird way. We allocate OIDs on a per-database level and share the allocated OIDs on tserver for all databases. In this case, OID collision happens due to the same range of OIDs allocated to and shared by different tservers. This diff resolves the oid collision issue for YSQL CREATE DATABASE by retrying CREATE DATABASE if oid collision happens. A more general fix for the OID collision issue will be completed in a future diff. Jira: DB-5849 Test Plan: ./yb_build.sh --cxx-test pg_libpq-test --gtest_filter PgLibPqTest.RetryCreateDatabasePgOidCollisionFromTservers Jenkins: urgent Reviewers: tverona, myang, zdrudi Reviewed By: myang, zdrudi Subscribers: ybase, yql, bogdan Differential Revision: https://phorge.dev.yugabyte.com/D27004
- Loading branch information
Showing
10 changed files
with
148 additions
and
33 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