Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
296f7f65
Commit
296f7f65
authored
Aug 24, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag used to enable subtransactions counter
Changelog: performance
parent
99a392f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
16 deletions
+3
-16
config/feature_flags/ops/active_record_subtransactions_counter.yml
...ature_flags/ops/active_record_subtransactions_counter.yml
+0
-8
lib/gitlab/database.rb
lib/gitlab/database.rb
+3
-8
No files found.
config/feature_flags/ops/active_record_subtransactions_counter.yml
deleted
100644 → 0
View file @
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
lib/gitlab/database.rb
View file @
296f7f65
...
@@ -207,10 +207,10 @@ module Gitlab
...
@@ -207,10 +207,10 @@ module Gitlab
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
class_methods
do
class_methods
do
# A
monkeypatch over ActiveRecord::Base.transaction.
# A
patch over ActiveRecord::Base.transaction that provides
#
It provides
observability into transactional methods.
# observability into transactional methods.
def
transaction
(
**
options
,
&
block
)
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
)
::
Gitlab
::
Database
::
Metrics
.
subtransactions_increment
(
self
.
name
)
end
end
...
@@ -218,11 +218,6 @@ module Gitlab
...
@@ -218,11 +218,6 @@ module Gitlab
super
(
**
options
,
&
block
)
super
(
**
options
,
&
block
)
end
end
end
end
def
gitlab_track_subtransactions?
::
Feature
.
enabled?
(
:active_record_subtransactions_counter
,
type: :ops
,
default_enabled: :yaml
)
&&
connection
.
transaction_open?
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment