Commit 6a5aa584 authored by Igor Drozdov's avatar Igor Drozdov

Remove blobs_fetch_in_batches feature flag

parent 96df6dcd
---
title: Remove blobs_fetch_in_batches feature flag
merge_request: 29069
author:
type: added
......@@ -86,13 +86,9 @@ module Gitlab
# to the caller to limit the number of blobs and blob_size_limit.
#
def batch(repository, blob_references, blob_size_limit: MAX_DATA_DISPLAY_SIZE)
if Feature.enabled?(:blobs_fetch_in_batches, default_enabled: true)
blob_references.each_slice(BATCH_SIZE).flat_map do |refs|
repository.gitaly_blob_client.get_blobs(refs, blob_size_limit).to_a
end
else
repository.gitaly_blob_client.get_blobs(blob_references, blob_size_limit).to_a
end
end
# Returns an array of Blob instances just with the metadata, that means
......
......@@ -301,7 +301,6 @@ describe Gitlab::Git::Blob, :seed_helper do
stub_const('Gitlab::Git::Blob::BATCH_SIZE', 2)
end
context 'blobs_fetch_in_batches is enabled' do
it 'fetches the blobs in batches' do
expect(client).to receive(:get_blobs).with(first_batch, limit).ordered
expect(client).to receive(:get_blobs).with(second_batch, limit).ordered
......@@ -310,19 +309,6 @@ describe Gitlab::Git::Blob, :seed_helper do
subject
end
end
context 'blobs_fetch_in_batches is disabled' do
before do
stub_feature_flags(blobs_fetch_in_batches: false)
end
it 'fetches the blobs in a single batch' do
expect(client).to receive(:get_blobs).with(blob_references, limit)
subject
end
end
end
end
describe '.batch_metadata' do
......
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