Repository navigation
LockGuard that can measure time - #88898
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [90fdca8] Summary: ❌
|
This comment has been minimized.
This comment has been minimized.
nikitamikhaylov
force-pushed
the
traceable_locks
branch
2 times, most recently
from
October 24, 2025 13:00
e798e0d to
622ace4
Compare
Member
Author
|
That's too much: |
Member
Author
|
Now it's clear what takes time -- |
Member
Author
|
More precisely, it is |
nikitamikhaylov
force-pushed
the
traceable_locks
branch
2 times, most recently
from
October 27, 2025 16:49
0b12bde to
a7c3e56
Compare
tavplubix
reviewed
Oct 27, 2025
Member
Author
|
I think we can merge this PR right away. |
tavplubix
reviewed
Oct 31, 2025
Comment on lines
+12
to
+16
| #ifndef NDEBUG | ||
| static constexpr auto THRESHOLD_MILLISECONDS = 1000; | ||
| #else | ||
| static constexpr auto THRESHOLD_MILLISECONDS = 10000; | ||
| #endif |
Member
There was a problem hiding this comment.
It means 1s for debug build and 10s for other builds
nikitamikhaylov
force-pushed
the
traceable_locks
branch
from
November 3, 2025 21:15
56d0fe3 to
90fdca8
Compare
tavplubix
approved these changes
Nov 4, 2025
Member
Author
|
I removed the backport labels, let it live in master. Not sure about how good the checks are. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Introduced a
LockGuardWithStopWatchclass and used it in the background pool for executing merges. In case a mutex was held for a second or some thread was struggling to get it within a second a warning message will be printed.Moved the heavy code from the destructor of
MergeMutateSelectedEntrytofinalize()method to avoid holding the lock inMergeTreeBackgroundexecutor for too long.Documentation entry for user-facing changes