Cells: Iteration 2: Ignore cross-joins, cross-db between `gitlab_main` and `gitlab_main_clusterwide|cell` to allow slowly updating `gitlab_schema` for tables
Problem
As part of the work on #390102 (closed) and !108462 (closed) we need to allow a number of existing cross-joins, create related issues,
that we would later schedule to fix them to fulfil User can create group.
Once we change code as below it will trigger number of violations:
-
namespacesto usegitlab_main_cell -
usersto usegitlab_main_clusterwide
The exhaustive list of cross-joins that require describing can be identified by looking at Draft: Cells: Move `users` and `namespaces` in ... (!108462 - closed) for:
-
allow_cross_joins_across_databases- cross-joins that execute betweenusersandnamespaces -
allow_cross_database_modification_within_transaction- cross-DB modification that changesusersandnamespacesin a single transaction -
temporary_ignore_tables_in_transaction- cross-DB modification that changesusersandnamespacesin a single transaction -
cross_database_ignore_tables- cross-DB modification (very wide) that allows to usesubject.save!for records creating users and namespaces
At this stage it is "OK" to mark cross-DB modification and fix them later, as in worst case it affects transaction rollback capabilities in case of failures.
This issue requires describing each of the above, with what SQL query it executes, for what reason and possible solutions.
Edited by Kamil Trzciński