-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[YSQL] Keyspace already exists issue caused by OID collision + X #16441
Labels
Comments
yifanguan
added
area/ysql
Yugabyte SQL (YSQL)
status/awaiting-triage
Issue awaiting triage
labels
Mar 15, 2023
yugabyte-ci
added
kind/bug
This issue is a bug
priority/medium
Medium priority issue
labels
Mar 15, 2023
1 task
kripasreenivasan
assigned m-iancu, sushantrmishra, tverona1 and yifanguan and unassigned m-iancu, sushantrmishra, tverona1 and yifanguan
Apr 3, 2023
@yifanguan
in |
yifanguan
added a commit
that referenced
this issue
Jul 20, 2023
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
Resolved by commit 1c781b7 |
yifanguan
added a commit
that referenced
this issue
Jul 20, 2023
…ion 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. Original commit: 1c781b7 / D27004 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 Subscribers: ybase, bogdan, yql Differential Revision: https://phorge.dev.yugabyte.com/D27114
yifanguan
added a commit
that referenced
this issue
Jul 27, 2023
…n 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 Original commit: 1c781b7 / D27004 Test Plan: ./yb_build.sh --cxx-test pg_libpq-test --gtest_filter PgLibPqTest.RetryCreateDatabasePgOidCollisionFromTservers Reviewers: tverona, myang, zdrudi Reviewed By: zdrudi Subscribers: ybase, yql, bogdan Differential Revision: https://phorge.dev.yugabyte.com/D27247
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Jira Link: DB-5849
Description
This is another side-effect issue caused by OID collision issue #16130 + X.
First,
It looks like we end up never clean up the namespace_ids_map_ after deleting a YSQL database.
In
catalog_manager.cc
And a small repro on a fresh cluster to illustrate this issue:
Workaround is to retry the failed create database statement.
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: