Commit graph

6 commits

Author SHA1 Message Date
GitLab Bot
5393d9eb26 Add latest changes from gitlab-org/gitlab@master 2020-12-22 12:10:09 +00:00
GitLab Bot
4a3ba3e5f2 Add latest changes from gitlab-org/gitlab@master 2020-05-22 09:08:09 +00:00
Stan Hu
5c8ce94052 Fix statement timeouts in RemoveRestrictedTodos migration
On GitLab.com, the RemoveRestrictedTodos background migration
encountered about 700+ failures a day due to statement timeouts.

PostgreSQL might perform badly with a LIMIT 1 because the planner is
guessing that scanning the index in ID order will come across the
desired row in less time it will take the planner than using another
index. The order_hint does not affect the search results. For example,
`ORDER BY id ASC, updated_at ASC` means the same thing as `ORDER BY id
ASC`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52649
2018-11-04 06:01:17 -08:00
Jacopo
c6bddeacf4 Updates code using class_methods over module ClassMethods 2018-08-29 16:56:34 +02:00
gfyoung
15b878e27e Enable more frozen string in app/models/**/*.rb
Partially addresses #47424.
2018-08-07 00:37:36 -07:00
Yorick Peterse
ff78af152c
Added EachBatch for iterating tables in batches
This module provides a class method called `each_batch` that can be used
to iterate tables in batches in a more efficient way compared to Rails'
`in_batches` method. This commit also includes a RuboCop cop to
blacklist the use of `in_batches` in favour of this new method.
2017-07-07 16:39:36 +02:00