Commit 296f7f65 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove feature flag used to enable subtransactions counter

Changelog: performance
parent 99a392f1
---
name: active_record_subtransactions_counter
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/66477
rollout_issue_url:
milestone: '14.1'
type: ops
group: group::pipeline execution
default_enabled: false
......@@ -207,10 +207,10 @@ module Gitlab
extend ActiveSupport::Concern
class_methods do
# A monkeypatch over ActiveRecord::Base.transaction.
# It provides observability into transactional methods.
# A patch over ActiveRecord::Base.transaction that provides
# observability into transactional methods.
def transaction(**options, &block)
if options[:requires_new] && gitlab_track_subtransactions?
if options[:requires_new] && connection.transaction_open?
::Gitlab::Database::Metrics.subtransactions_increment(self.name)
end
......@@ -218,11 +218,6 @@ module Gitlab
super(**options, &block)
end
end
def gitlab_track_subtransactions?
::Feature.enabled?(:active_record_subtransactions_counter, type: :ops, default_enabled: :yaml) &&
connection.transaction_open?
end
end
end
......
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