diff options
author | Stan Hu <stanhu@gmail.com> | 2018-11-04 05:59:13 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-11-04 06:01:17 -0800 |
commit | 5c8ce94052fab07c979f6b1ecef9f7b807909b94 (patch) | |
tree | ffe0a839038dc2accdae13a7fc6d7b763861f2b4 /changelogs | |
parent | 4d3ff28a6a0d81f44ccb3eb1602996e5d7c3de1c (diff) | |
download | gitlab-ce-5c8ce94052fab07c979f6b1ecef9f7b807909b94.tar.gz |
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
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/sh-fix-issue-52649.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/sh-fix-issue-52649.yml b/changelogs/unreleased/sh-fix-issue-52649.yml new file mode 100644 index 00000000000..34b7f74a345 --- /dev/null +++ b/changelogs/unreleased/sh-fix-issue-52649.yml @@ -0,0 +1,5 @@ +--- +title: Fix statement timeouts in RemoveRestrictedTodos migration +merge_request: 22795 +author: +type: other |