Skip to content
代码片段 群组 项目
  • Dylan Griffith's avatar
    20c78598
    Add MainClusterwide::ApplicationRecord and new connection · 20c78598
    Dylan Griffith 创作于
    Adds a new `main_clusterwide` connection option that can be configured
    in `config/database.yml`. This connection is part of the
    [Pods](https://gitlab.com/groups/gitlab-org/-/epics/7582) initiative
    (soon to be renamed to "Silos").
    
    This connection won't be configured in production or even GDK any time
    soon and as such we've opted to have these code paths untested in CI.
    Trying to test this new connection in CI would mean having a separate
    `config/database.yml` that ran all RSpec tests again which is just too
    expensive for this early stage of the project.
    
    The `main_clusterwide` connection will eventually be used to have a
    shared Postgres database that is used by many separate GitLab pods
    (silos/instances). We need to share some data like settings, users,
    licenses across all these pods while separating pod-specific data like
    projects, notes, merge_requests . This allows us to horizontally scale
    most of the data but still users can login and access data in any pod.
    
    When this connection is not configured then the `main` connection will
    be used (as before) so this change should be a no-op for anyone that
    doesn't explicitly go in and add `main_clusterwide` to their
    `config/database.yml`.
    
    There is a lot more detail on the architecture at
    https://docs.gitlab.com/ee/architecture/blueprints/pods/ but the main
    point is that this connection is for "shared" stuff and we're starting
    with `application_settings` and `licenses` as these are the simplest
    tables to decouple.
    
    Changelog: other
    20c78598
    历史
    Add MainClusterwide::ApplicationRecord and new connection
    Dylan Griffith 创作于
    Adds a new `main_clusterwide` connection option that can be configured
    in `config/database.yml`. This connection is part of the
    [Pods](https://gitlab.com/groups/gitlab-org/-/epics/7582) initiative
    (soon to be renamed to "Silos").
    
    This connection won't be configured in production or even GDK any time
    soon and as such we've opted to have these code paths untested in CI.
    Trying to test this new connection in CI would mean having a separate
    `config/database.yml` that ran all RSpec tests again which is just too
    expensive for this early stage of the project.
    
    The `main_clusterwide` connection will eventually be used to have a
    shared Postgres database that is used by many separate GitLab pods
    (silos/instances). We need to share some data like settings, users,
    licenses across all these pods while separating pod-specific data like
    projects, notes, merge_requests . This allows us to horizontally scale
    most of the data but still users can login and access data in any pod.
    
    When this connection is not configured then the `main` connection will
    be used (as before) so this change should be a no-op for anyone that
    doesn't explicitly go in and add `main_clusterwide` to their
    `config/database.yml`.
    
    There is a lot more detail on the architecture at
    https://docs.gitlab.com/ee/architecture/blueprints/pods/ but the main
    point is that this connection is for "shared" stuff and we're starting
    with `application_settings` and `licenses` as these are the simplest
    tables to decouple.
    
    Changelog: other
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
main_clusterwide.sql 13 B