Newly setup database, if decomposed should run lock_writes
If a GitLab instance is newly setup, gitlab:db:lock_writes
should be run to ensure CI tables are not written in main
DB, and Main tables are not written in ci
DB.
This helps protect against split-brain situations in case of bugs / mis-configurations
Proposal
Invoke gitlab:db:lock_writes
after gitlab:setup
. It is save even for single db setups (#393145 (comment 1291039542))