Skip to content
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

geo: Create transaction tables on ALTER TABLE SET TABLESPACE #11353

Closed
es1024 opened this issue Feb 3, 2022 · 0 comments
Closed

geo: Create transaction tables on ALTER TABLE SET TABLESPACE #11353

es1024 opened this issue Feb 3, 2022 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features

Comments

@es1024
Copy link
Contributor

es1024 commented Feb 3, 2022

Description

Context: #9980, #10783

We currently automate transaction table creation by attempting to create one when a table is created under a tablespace with placement information, but this can result in there being a tablespace with tables without a transaction table, if no tables were ever created under the tablespace, and tables were altered to be under the tablespace only. There should be a hook for the ALTER TABLE SET TABLESPACE path to attempt to create the transaction table as well.

@es1024 es1024 added the area/docdb YugabyteDB core features label Feb 3, 2022
@es1024 es1024 self-assigned this Feb 3, 2022
@es1024 es1024 added this to To Do in Row Level Geo Partitioning via automation Feb 3, 2022
es1024 added a commit that referenced this issue Mar 2, 2022
… update

Summary:
Changed the tablespace update procedure to start transaction table creation for tablespaces
which have placements set and at least one table in them (to account for tablespaces with bad
placements). This should handle both tablespaces from previous versions with no associated transaction
table, and tablespaces whose first table was through ALTER TABLE SET TABLESPACE. The transaction
table creation hook in CreateTable is left in as an optimization.

Test Plan: `ybd --cxx-test pgwrapper_geo_transactions-test --gtest_filter GeoTransactionsTest.TestAutomaticLocalTransactionTableCreationWithAlter`

Reviewers: dsrinivasan

Reviewed By: dsrinivasan

Subscribers: rthallam, bogdan, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D15601
@es1024 es1024 closed this as completed Mar 2, 2022
Row Level Geo Partitioning automation moved this from To Do to Done Mar 2, 2022
jayant07-yb pushed a commit to jayant07-yb/yugabyte-db that referenced this issue Mar 8, 2022
…blespace update

Summary:
Changed the tablespace update procedure to start transaction table creation for tablespaces
which have placements set and at least one table in them (to account for tablespaces with bad
placements). This should handle both tablespaces from previous versions with no associated transaction
table, and tablespaces whose first table was through ALTER TABLE SET TABLESPACE. The transaction
table creation hook in CreateTable is left in as an optimization.

Test Plan: `ybd --cxx-test pgwrapper_geo_transactions-test --gtest_filter GeoTransactionsTest.TestAutomaticLocalTransactionTableCreationWithAlter`

Reviewers: dsrinivasan

Reviewed By: dsrinivasan

Subscribers: rthallam, bogdan, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D15601
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Development

No branches or pull requests

1 participant