diff options
| author | Stan Hu <stanhu@gmail.com> | 2018-06-18 16:38:34 -0700 |
|---|---|---|
| committer | Stan Hu <stanhu@gmail.com> | 2018-06-18 16:42:20 -0700 |
| commit | 4f9068dfc06269ca7e2247fb0be2796452546de1 (patch) | |
| tree | b8a4f61fb70187d1085d7ad0dacf08babf5c3b86 /changelogs | |
| parent | 02c007bda52ac4cbcc8df98e2faf9273745bf951 (diff) | |
| download | gitlab-ce-4f9068dfc06269ca7e2247fb0be2796452546de1.tar.gz | |
Eliminate N+1 queries in LFS file locks checks during a pushsh-optimize-locks-check-ce
This significantly improves performance when a user pushes many references.
project.path_locks.any? doesn't cache the output and runs `SELECT 1 AS one
FROM "path_locks" WHERE project_id = N` each time. When there are thousands
of refs being pushed, this can time out the unicorn worker.
CE port for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6159.
Diffstat (limited to 'changelogs')
| -rw-r--r-- | changelogs/unreleased/sh-optimize-locks-check-ce.yml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/changelogs/unreleased/sh-optimize-locks-check-ce.yml b/changelogs/unreleased/sh-optimize-locks-check-ce.yml new file mode 100644 index 00000000000..933ec9b79bf --- /dev/null +++ b/changelogs/unreleased/sh-optimize-locks-check-ce.yml @@ -0,0 +1,5 @@ +--- +title: Eliminate N+1 queries in LFS file locks checks during a push +merge_request: +author: +type: performance |
