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
3bbbc719
Commit
3bbbc719
authored
Aug 23, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce thresholds for subtransactions logging
parent
3177ec13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
lib/gitlab/database/transaction/context.rb
lib/gitlab/database/transaction/context.rb
+6
-6
No files found.
lib/gitlab/database/transaction/context.rb
View file @
3bbbc719
...
...
@@ -6,9 +6,9 @@ module Gitlab
class
Context
attr_reader
:context
LOG_DEPTH_THRESHOLD
=
8
LOG_SAVEPOINTS_THRESHOLD
=
32
LOG_DURATION_S_THRESHOLD
=
300
LOG_DEPTH_THRESHOLD
=
4
# 3 nested subtransactions + 1 real transaction
LOG_SAVEPOINTS_THRESHOLD
=
5
# 5 `SAVEPOINTS` created in sequence or nested
LOG_DURATION_S_THRESHOLD
=
120
# 2 minutes long transaction
LOG_THROTTLE_DURATION
=
1
def
initialize
...
...
@@ -46,15 +46,15 @@ module Gitlab
end
def
depth_threshold_exceeded?
@context
[
:depth
].
to_i
>
LOG_DEPTH_THRESHOLD
@context
[
:depth
].
to_i
>
=
LOG_DEPTH_THRESHOLD
end
def
savepoints_threshold_exceeded?
@context
[
:savepoints
].
to_i
>
LOG_SAVEPOINTS_THRESHOLD
@context
[
:savepoints
].
to_i
>
=
LOG_SAVEPOINTS_THRESHOLD
end
def
duration_threshold_exceeded?
duration
.
to_i
>
LOG_DURATION_S_THRESHOLD
duration
.
to_i
>
=
LOG_DURATION_S_THRESHOLD
end
def
log_savepoints?
...
...
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