Decomposition: Identify other teams and features impacted by decomposing the database
# Goal
The main goal of the gitlab~19419036 decomposition efforts is to split the database into two, for the first iteration, to address database scalability concerns. The first iteration focuses on a database for CI and a database for the rest of the functionality. There are likely customers that depend on all of the data coming from a single database. This issue is to gather information, determine the impact of decomposing the database and create issues to resolve those dependencies to work with the new architecture.
# Implementation
1. Architecture overview https://gitlab.com/groups/gitlab-org/-/epics/6168#solution.
1. For the first iteration -
1. All `ci_*` tables will be moved into a second logical database.
1. All the other tables remain in one logical database.
1. [Migration plan of `ci_*` tables](https://about.gitlab.com/handbook/engineering/development/enablement/sharding/migrate-ci-tables-to-new-database-plan.html).
1. The most part of implementation is based on [Rails 6 multi DB support](https://guides.rubyonrails.org/active_record_multiple_databases.html) so in simple terms we configure Rails to know which DB to use for each Rails model.
1. [Remove all foreign keys that cross-join from/to CI](https://gitlab.com/gitlab-org/gitlab/-/issues/333412).
1. [Make schema migrations aware of multiple databases](https://gitlab.com/gitlab-org/gitlab/-/issues/334232).
# Request
We are asking team members within GitLab to consider how this may impact you, your team or area of ownership. The gitlab~19419036 will collaborate with the areas impacted to -
1. Determine whether the impact is on the critical path of the first iteration.
1. Find a solution as the details become clear.
### Outcome
Please create an issue under this epic to track questions and discoveries for your feature domain.
### Questionnaire
Below is a questionnaire that may help you discover possible impacts. Basically, examine how data is extracted from the database then think about how decomposed databases could impact your features.
1. Do you see potential impacts from the decomposition PoC https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62092?
1. Do you connect to the database directly?
1. Does your feature require data joins from the two logical databases?
1. Does your ActiveRecord query span tables in the two logical databases?
# Possibly Impacted
Some ideas have already been identified that will require follow up.
- [x] Usage ping (no impact)
- [ ] Data analysis (data extract, Snowflake?)
- [ ] Sales portal, such as licensing (Zuora <-> CustomerDot)
- [ ] Pricing
- [ ] CI Minutes
- [ ] Storage
- [ ] Security Access
epic