Create idea of read-only database
What does this MR do?
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo secondary node). But in GitLab CE it also might be useful to have the "read-only" idea around. So port it back to GitLab CE.
Also having the principle of read-only in GitLab CE would hopefully lead to less errors introduced, doing write operations when there aren't allowed for read-only calls.
Are there points in the code the reviewer needs to double check?
See if app/controllers/sessions_controller.rb
still works like before.
Why was this MR needed?
It backports gitlab-org/gitlab-ee!2954.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated - [-] API support added
-
Tests added for this feature/bug - Review
- [-] Has been reviewed by UX
- [-] Has been reviewed by Frontend
-
Has been reviewed by Backend - [-] Has been reviewed by Database
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Closes gitlab-org/gitlab-ce#37534.
Edited by Toon Claes