Commit 7bda07f8 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Cleanup optimize_shifting_relative_positions flag

Removes the feature flag for optimizing calculation when shifting
siblings when moving nulls to start or end

Changelog: other
MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/60792
parent 8fb90fbd
......@@ -53,12 +53,7 @@ module RelativePositioning
return [size, starting_from] if size >= MIN_GAP
terminus =
if Feature.enabled?(:optimize_shifting_relative_positions, default_enabled: :yaml)
context.at_position(starting_from)
else
at_end ? context.max_sibling : context.min_sibling
end
terminus = context.at_position(starting_from)
if at_end
terminus.shift_left
......
---
title: Remove optimize_shifting_relative_positions feature flag
merge_request: 60792
author:
type: other
---
name: optimize_shifting_relative_positions
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59745
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/328402
milestone: '13.12'
type: development
group: group::project management
default_enabled: false
......@@ -66,7 +66,7 @@ RSpec.shared_examples 'a class that supports relative positioning' do
end
end
shared_examples '.move_nulls_to_end' do
describe '.move_nulls_to_end' do
let(:item3) { create_item }
let(:sibling_query) { item1.class.relative_positioning_query_base(item1) }
......@@ -186,7 +186,7 @@ RSpec.shared_examples 'a class that supports relative positioning' do
end
end
shared_examples '.move_nulls_to_start' do
describe '.move_nulls_to_start' do
let(:item3) { create_item }
let(:sibling_query) { item1.class.relative_positioning_query_base(item1) }
......@@ -261,24 +261,6 @@ RSpec.shared_examples 'a class that supports relative positioning' do
end
end
context 'when optimize_shifting_relative_positions is enabled' do
before do
stub_feature_flags(optimize_shifting_relative_positions: true)
end
it_behaves_like '.move_nulls_to_start'
it_behaves_like '.move_nulls_to_end'
end
context 'when optimize_shifting_relative_positions is disabled' do
before do
stub_feature_flags(optimize_shifting_relative_positions: false)
end
it_behaves_like '.move_nulls_to_start'
it_behaves_like '.move_nulls_to_end'
end
describe '#move_before' do
let(:item3) { create(factory, default_params) }
......
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