diff options
Diffstat (limited to 'doc/development/database/multiple_databases.md')
-rw-r--r-- | doc/development/database/multiple_databases.md | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index 4387e19b6df..79e1d3c0578 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -47,6 +47,13 @@ The usage of schema enforces the base class to be used: - `Gitlab::Database::SharedModel` for `gitlab_shared` - `PackageMetadata::ApplicationRecord` for `gitlab_pm` +### Guidelines on choosing between `gitlab_main_cell` and `gitlab_main_clusterwide` schema + +When you choose the appropriate schema for tables, consider the following guidelines as part of the [Cells](../../architecture/blueprints/cells/index.md) architecture: + +- Default to `gitlab_main_cell`: We expect most tables to be assigned to the `gitlab_main_cell` schema by default. Choose this schema if the data in the table is related to `projects` or `namespaces`. +- Consult with the Tenant Scale group: If you believe that the `gitlab_main_clusterwide` schema is more suitable for a table, seek approval from the Tenant Scale group This is crucial because it has scaling implications and may require reconsideration of the schema choice. + ### The impact of `gitlab_schema` The usage of `gitlab_schema` has a significant impact on the application. @@ -732,7 +739,7 @@ to limit the modes where tests can run, and skip them on any other modes. | `skip_if_multiple_databases_are_setup(:ci)` | Only on **single-db** | | `skip_if_multiple_databases_not_setup(:ci)` | On **single-db-ci-connection** and **multiple databases** | -## Testing for multiple databases, including main_clusterwide +## Testing for multiple databases, including `main_clusterwide` By default, we do not setup the `main_clusterwide` connection in CI pipelines. However, if you add the label `~"pipeline:run-clusterwide-db"`, the pipelines will run with 3 connections, `main`, `ci` and `main_clusterwide`. |