Commit 09ba936c authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'remove-backfill-partitioned-audit-events-ff' into 'master'

Remove feature flag to backfill partitioned table

See merge request gitlab-org/gitlab!43418
parents 5d89d75a 8ae905d2
---
name: backfill_partitioned_audit_events
introduced_by_url:
rollout_issue_url:
group:
type: development
default_enabled: true
......@@ -11,8 +11,6 @@ module Gitlab
PAUSE_SECONDS = 0.25
def perform(start_id, stop_id, source_table, partitioned_table, source_column)
return unless Feature.enabled?(:backfill_partitioned_audit_events, default_enabled: true)
if transaction_open?
raise "Aborting job to backfill partitioned #{source_table} table! Do not run this job in a transaction block!"
end
......
......@@ -116,23 +116,6 @@ RSpec.describe Gitlab::Database::PartitioningMigrationHelpers::BackfillPartition
expect(jobs_updated).to eq(1)
end
context 'when the feature flag is disabled' do
let(:mock_connection) { double('connection') }
before do
allow(subject).to receive(:connection).and_return(mock_connection)
stub_feature_flags(backfill_partitioned_audit_events: false)
end
it 'exits without attempting to copy data' do
expect(mock_connection).not_to receive(:execute)
subject.perform(1, 100, source_table, destination_table, unique_key)
expect(destination_model.count).to eq(0)
end
end
context 'when the job is run within an explicit transaction block' do
let(:mock_connection) { double('connection') }
......
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