summaryrefslogtreecommitdiff
path: root/changelogs
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-04-24 14:13:32 +0100
committerSean McGivern <sean@gitlab.com>2019-04-24 14:13:32 +0100
commit1885691b035a29948fa009bc505c59a97fb79ae6 (patch)
tree1acbe5703f846f2fc8e4a0114f726208c66c3d92 /changelogs
parent272071219e5b8261352b4b98431a78d51a93ccda (diff)
downloadgitlab-ce-1885691b035a29948fa009bc505c59a97fb79ae6.tar.gz
Ensure that we only request blobs in one batch
Blob.lazy adds a blob to a batch to load at a later point, using the BatchLoader library. Whenever any lazy blob's attributes are accessed, all lazy blobs requested to that point will be loaded. BatchLoader, the library we use for this, should only request items in a batch once. That is, if we have these batches: 1. a, b, c 2. d, e, f Then a, b, and c should only be requested in the first batch. But if you modify the list of items in the batch, then the second batch will request a, b, c, d, e, f, which is almost certainly not what we want! https://github.com/exAspArk/batch-loader/issues/44 is the upstream issue for this, but we can also solve this in our application by not modifying the arguments we're using inside a BatchLoader batch.
Diffstat (limited to 'changelogs')
-rw-r--r--changelogs/unreleased/fix-lazy-blobs-requesting-all-previous-blobs.yml6
1 files changed, 6 insertions, 0 deletions
diff --git a/changelogs/unreleased/fix-lazy-blobs-requesting-all-previous-blobs.yml b/changelogs/unreleased/fix-lazy-blobs-requesting-all-previous-blobs.yml
new file mode 100644
index 00000000000..58f5a9c943c
--- /dev/null
+++ b/changelogs/unreleased/fix-lazy-blobs-requesting-all-previous-blobs.yml
@@ -0,0 +1,6 @@
+---
+title: Fix Blob.lazy always loading all previously-requested blobs when a new request
+ is made
+merge_request:
+author:
+type: performance