Commit 2f7dbd06 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Merge branch '320758-remove-merge_request_rebase_nowait_lock-feature-flag' into 'master'

Remove merge_request_rebase_nowait_lock feature flag [RUN ALL RSPEC] [RUN AS-IF-FOSS]

See merge request gitlab-org/gitlab!56406
parents b6befbe0 12ae2795
......@@ -1899,11 +1899,7 @@ class MergeRequest < ApplicationRecord
end
def with_rebase_lock
if Feature.enabled?(:merge_request_rebase_nowait_lock, default_enabled: true)
with_retried_nowait_lock { yield }
else
with_lock(true) { yield }
end
end
# If the merge request is idle in transaction or has a SELECT FOR
......
---
title: Remove merge_request_rebase_nowait_lock flag
merge_request: 56406
author:
type: other
---
name: merge_request_rebase_nowait_lock
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/18481
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/320758
milestone: '12.5'
type: development
group: group::code review
default_enabled: true
......@@ -2048,21 +2048,6 @@ RSpec.describe Projects::MergeRequestsController do
end
end
context 'with SELECT FOR UPDATE lock' do
before do
stub_feature_flags(merge_request_rebase_nowait_lock: false)
end
it 'executes rebase' do
allow_any_instance_of(MergeRequest).to receive(:with_lock).with(true).and_call_original
expect(RebaseWorker).to receive(:perform_async)
post_rebase
expect(response).to have_gitlab_http_status(:ok)
end
end
context 'with NOWAIT lock' do
it 'returns a 409' do
allow_any_instance_of(MergeRequest).to receive(:with_lock).with('FOR UPDATE NOWAIT').and_raise(ActiveRecord::LockWaitTimeout)
......
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