-
Notifications
You must be signed in to change notification settings - Fork 834
Apply jitter to the configured timeout for performing idle compactions. #3850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
85caa29 to
eef313b
Compare
|
Rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please updated the CLI flag description at pkg/storage/tsdb/config.go to mention a jitter is applied.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Attempt to prevent idle compaction from happening concurrently by introducing a 25% jitter to the configured timeout. This jitter only increases the timeout, such that the configured minimum timeout is always adhered to. Signed-off-by: Steve Simpson <[email protected]>
Signed-off-by: Steve Simpson <[email protected]>
Move the setting of TSDB.compactionIdleTimeout just after struct creation. This avoids a race condition in the unit test because it makes calls to compactBlocks directly. Signed-off-by: Steve Simpson <[email protected]>
22e5fcb to
b9c5cc0
Compare
|
Rebase |
Signed-off-by: Steve Simpson <[email protected]>
| # If TSDB head is idle for this duration, it is compacted. 0 means disabled. | ||
| # If TSDB head is idle for this duration, it is compacted. Note that up to | ||
| # 25% jitter is added to the value to avoid ingesters compacting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just wondering, what is the reason to leave the jitter percentage unconfigurable to the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't have a strong opinion here, other than following how jitter has typically been added in other places.
I don't think there would be opposition to be being configurable though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Make sense. I agree we can make it configurable when the need arises in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
What this PR does:
Attempt to prevent idle compaction from happening concurrently by
introducing a 25% jitter to the configured timeout. This jitter only
increases the timeout, such that the configured minimum timeout is
always adhered to.
Which issue(s) this PR fixes:
Fixes #3832
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]