You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of adding geopartitioning to the txn status tables, one requirement we want to uphold is that a transaction that needs to touch global data cannot be executed against a txn status tablet that is geo bound to a single fault domain.
What this translates to is
We need a way to mark that a txn is global or local. We can start with a bool session variable for now.
If the user starts a local txn, but then proceeds to do writes against global tables, we probably want to add and throw a new type of error.
The PG layer needs to flow this local vs global information to the TS layer, at the time of picking the txn id, so we can select an appropriate tablet.
Open questions: For local txns, we also need to decide what the placement rules are:
We have 3 levels of placement: cloud/region/zone. Do we agree that the locality should be at the region level?
Do we need PG to send any info about the placement it wants, or can we just assume that it has already selected the correct TS and then we can use that TS's placement info?
The text was updated successfully, but these errors were encountered:
Summary:
Added the `global_transaction` session variable, which serves as an override for the
`force_global_transactions` gflag and can be used to force a transaction to use global
transaction status tables rather than existing local transaction status tables.
Depends on D13900.
Test Plan:
Manually tested non-local queries with local transaction status tables created to
verify failure when not set. Modified test cases from D13900 to also test with setting
the variable (`ybd --cxx-test pgwrapper_geo_transactions-test`).
Jenkins: urgent
Reviewers: bogdan, mbautin, dsrinivasan, rthallam, dmitry
Reviewed By: dmitry
Subscribers: ybase
Differential Revision: https://phabricator.dev.yugabyte.com/D13704
Summary:
Use tablespaces for placement for tables in tablegroups.
* Moved the `IsTablegroupParentTable()` and `IsColocatedParentTable()` checks to TableInfo instead of CatalogManager, so that `TableInfo::UsesTablespacesForPlacement` can use them.
* Added a function `ReadTablespaceInfoFromPgYbTablegroup` that updates the table_to_tablespace map with information for the tablegroup's parent table.
Related remaining work: D14426
Test Plan:
```
ybd --java-test org.yb.pgsql.TestTablespaceProperties
```
Reinitialized DB on `48dc70a0775eed9d598a4c2a6ccd9ef3b965695d~` (the parent of the commit where `pg_yb_tablegroup` was introduced), and then ran ysqlsh with these changes. I can see in the logs that tables in a tablespace are being properly balanced, and we don't run into any issues or log spew when `pg_yb_tablegroup` does not exist.
Reviewers: mpolitov, dsrinivasan, skedia
Reviewed By: skedia
Subscribers: ybase, yql, bogdan, smishra
Differential Revision: https://phabricator.dev.yugabyte.com/D14193
Context: #9980, #10158
As part of adding geopartitioning to the txn status tables, one requirement we want to uphold is that a transaction that needs to touch global data cannot be executed against a txn status tablet that is geo bound to a single fault domain.
What this translates to is
Open questions: For local txns, we also need to decide what the placement rules are:
The text was updated successfully, but these errors were encountered: