1. 21 8月, 2018 1 次提交
  2. 20 8月, 2018 1 次提交
    • Y
      Refactor AutocompleteController · 6f3c4901
      Yorick Peterse 提交于
      This refactors the AutocompleteController according to the guidelines
      and boundaries discussed in
      https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically,
      ActiveRecord logic is moved to different finders, which are then used in
      the controller. View logic in turn is moved to presenters, instead of
      directly using ActiveRecord's "to_json" method.
      
      The finder MoveToProjectFinder is also adjusted according to the
      abstraction guidelines and boundaries, resulting in a much more simple
      finder.
      
      By using finders (and other abstractions) more actively, we can push a
      lot of logic out of the controller. We also remove the need for various
      "before_action" hooks, though this could be achieved without using
      finders as well.
      
      The various finders related to AutcompleteController have also been
      moved into a namespace. This removes the need for calling everything
      "AutocompleteSmurfFinder", instead you can use
      "Autocomplete::SmurfFinder".
      6f3c4901
  3. 18 8月, 2018 1 次提交
  4. 17 8月, 2018 1 次提交
  5. 16 8月, 2018 7 次提交
  6. 15 8月, 2018 3 次提交
  7. 14 8月, 2018 4 次提交
  8. 13 8月, 2018 2 次提交
  9. 11 8月, 2018 2 次提交
    • G
      disable_statement_timeout doesn't require any argument anymore · f21e655b
      Gabriel Mazetto 提交于
      it will decide the method for disable statement_timeout upon
      per transaction or per session, based on how it's called.
      
      When calling with a block, block will be executed and it will use
      session based statement_timeout, otherwise will default to existing
      behavior.
      f21e655b
    • G
      MigrationHelper `disable_statement_timeout` accepts `transaction: false` · 09e7c75d
      Gabriel Mazetto 提交于
      By default statement_timeout will only be enabled during transaction
      lifetime, therefore not leaking outside of it.
      
      With `transaction: false` it will set for entire session, but requires
      a block to passed. It yields control and cleans up session after block
      finishes, also preventing leaking outside of it.
      09e7c75d
  10. 10 8月, 2018 3 次提交
  11. 09 8月, 2018 1 次提交
  12. 08 8月, 2018 2 次提交
  13. 07 8月, 2018 5 次提交
  14. 06 8月, 2018 2 次提交
    • F
      fdb5f285
    • Y
      Respond to DB health in background migrations · 91b752dc
      Yorick Peterse 提交于
      This changes the BackgroundMigration worker so it checks for the health
      of the DB before performing a background migration. This in turn allows
      us to reduce the minimum interval, without having to worry about blowing
      things up if we schedule too many migrations.
      
      In this setup, the BackgroundMigration worker will reschedule jobs as
      long as the database is considered to be in an unhealthy state. Once the
      database has recovered, the migration can be performed.
      
      To determine if the database is in a healthy state, we look at the
      replication lag of any replication slots defined on the primary. If the
      lag is deemed to great (100 MB by default) for too many slots, the
      migration is rescheduled for a later point in time.
      
      The health checking code is hidden behind a feature flag, allowing us to
      disable it if necessary.
      91b752dc
  15. 03 8月, 2018 5 次提交