Commit 80c3bfb2 authored by Andreas Brandl's avatar Andreas Brandl

Cleanup feature flag iid_always_track

Closes https://gitlab.com/gitlab-org/gitlab/issues/30515
parent 82f0365d
......@@ -57,8 +57,7 @@ module AtomicInternalId
end
define_method("track_#{scope}_#{column}!") do
iid_always_track = Feature.enabled?(:iid_always_track, default_enabled: true)
return unless @internal_id_needs_tracking || iid_always_track
return unless @internal_id_needs_tracking
scope_value = internal_id_read_scope(scope)
return unless scope_value
......
---
title: Avoid unnecessary locks on internal_ids
merge_request: 18328
author:
type: performance
......@@ -22,11 +22,6 @@ describe AtomicInternalId do
end
context 'when value is set by ensure_project_iid!' do
context 'with iid_always_track false' do
before do
stub_feature_flags(iid_always_track: false)
end
it 'does not track the value' do
expect(InternalId).not_to receive(:track_greatest)
......@@ -45,20 +40,6 @@ describe AtomicInternalId do
subject
end
end
context 'with iid_always_track enabled' do
before do
stub_feature_flags(iid_always_track: true)
end
it 'does not track the value' do
expect(InternalId).to receive(:track_greatest)
milestone.ensure_project_iid!
subject
end
end
end
end
describe '#ensure_project_iid!' do
......
......@@ -47,10 +47,6 @@ shared_examples_for 'AtomicInternalId' do |validate_presence: true|
end
describe 'internal id generation' do
before do
stub_feature_flags(iid_always_track: false)
end
subject { instance.save! }
it 'calls InternalId.generate_next and sets internal id attribute' 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