Commit aa67f5db authored by Stan Hu's avatar Stan Hu

Merge branch '258219-copy-designs-load-lfsobjects-in-batches' into 'master'

Batch load LfsObjects when copying designs

See merge request gitlab-org/gitlab!43638
parents c8e1de93 bfec2825
......@@ -259,7 +259,7 @@ module DesignManagement
oids = blobs.values.flat_map(&:values).map(&:lfs_oid)
repository_type = LfsObjectsProject.repository_types[:design]
new_rows = LfsObject.where(oid: oids).map do |lfs_object|
new_rows = LfsObject.where(oid: oids).find_each(batch_size: 1000).map do |lfs_object|
{
project_id: target_project.id,
lfs_object_id: lfs_object.id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment