An error occurred fetching the project authors.
  1. 20 Dec, 2021 1 commit
  2. 30 Nov, 2021 1 commit
  3. 25 Nov, 2021 2 commits
  4. 15 Nov, 2021 1 commit
    • Yorick Peterse's avatar
      Split Database::Connection into separate types · 9bb48c9b
      Yorick Peterse authored
      Gitlab::Database::Connection was a kitchen sink type of class: it had
      methods for obtaining database information (e.g. the database name),
      running WAL related queries, querying the status of transactions, and
      more.
      
      This commit splits this class into separate types. For example,
      reflection related methods are now located in
      Gitlab::Database::Reflection. Transaction related methods are moved into
      the Transactions module. The method to get a WAL diff has been moved
      into the LoadBalancer class.
      
      With this also changes the use of these methods. For example, instead of
      this:
      
          Gitlab::Database.main.cached_column_exists?(:users, :id)
      
      You now write this:
      
          Users.database.cached_column_exists?(:id)
      
      Apart from being shorter in many cases, it also decouples the code using
      these methods from the main database. This makes it easier to support
      multiple databases over time.
      9bb48c9b
  5. 11 Nov, 2021 1 commit
  6. 05 Nov, 2021 1 commit
  7. 03 Nov, 2021 1 commit
  8. 26 Oct, 2021 1 commit
  9. 21 Oct, 2021 2 commits
  10. 19 Oct, 2021 2 commits
  11. 12 Oct, 2021 1 commit
  12. 08 Oct, 2021 1 commit
    • Yorick Peterse's avatar
      Add support for load balancing multiple databases · 771f94fc
      Yorick Peterse authored
      This adds support for using the database load balancer with multiple
      databases. Load balancing is applied to two classes:
      
      - ActiveRecord::Base
      - Ci::CiDatabaseRecord
      
      Each class has its own load balancer, configuration, service discovery,
      etc. Load balancing for the CI class is only enabled when a CI
      configuration exists, as it can reuse the main load balancer when
      there's no dedicated CI database.
      
      Sticking technically supports multiple databases, but in practise we
      apply the same sticking rules to all databases. This is due to how
      LoadBalancing::Session is used: there is only one instance per
      request/Sidekiq job, and it's not aware of what database connections did
      what. This means that a write to database A will result in GitLab
      sticking to the primaries of _all_ databases. The choice for this is
      simple: it requires fewer code changes, and allows us to introduce
      multiple database support in smaller increments.
      
      One change we made to sticking is to turn the Sticking module into a
      class, and attach an instance to every base module that has its own load
      balancer. This makes it easier to apply sticking on a per-database level
      in the future, without having to type
      `Gitlab::Database::LoadBalancing::Sticking...` every time.
      
      Sticking also supports reading and writing of data using the old Redis
      key names. This ensures sticking continues to work during a deployment,
      as during this window we'll run two different versions in production.
      Once the code has been deployed to GitLab.com and has been confirmed to
      work, we'll remove support for reading/writing the old keys.
      
      Sidekiq also supports load balancing multiple databases. If a load
      balancer/database doesn't have any WAL data in the Sidekiq job, we treat
      the database as being in sync. This way we can support Sidekiq jobs
      using both the old and new load balancing data.
      
      See https://gitlab.com/gitlab-org/gitlab/-/issues/331776 for more
      details.
      
      Changelog: added
      771f94fc
  13. 22 Sep, 2021 1 commit
  14. 20 Sep, 2021 1 commit
  15. 17 Sep, 2021 1 commit
  16. 10 Sep, 2021 1 commit
  17. 06 Sep, 2021 1 commit
  18. 24 Aug, 2021 1 commit
  19. 23 Aug, 2021 1 commit
  20. 18 Aug, 2021 1 commit
  21. 17 Aug, 2021 1 commit
  22. 12 Aug, 2021 1 commit
  23. 09 Aug, 2021 1 commit
  24. 02 Aug, 2021 2 commits
  25. 28 Jul, 2021 1 commit
  26. 27 Jul, 2021 1 commit
  27. 26 Jul, 2021 1 commit
  28. 21 Jul, 2021 1 commit
  29. 14 Jul, 2021 1 commit
  30. 13 Jul, 2021 1 commit
  31. 01 Jul, 2021 1 commit
  32. 23 Jun, 2021 1 commit
  33. 21 Jun, 2021 1 commit
  34. 18 Jun, 2021 1 commit
  35. 14 Jun, 2021 1 commit
  36. 11 Jun, 2021 1 commit
    • Erick Bajao's avatar
      Add backend support for Coverage-Check rule · d8d6a39c
      Erick Bajao authored
      Adds new reporter approval rule for code coverage.
      Also renames the worker for syncing approval rules to a
      more generic one because it is not security only anymore.
      
      Changelog: added
      d8d6a39c