schematelemetrycontroller: shift schedules in time, make tenant-ro#88872
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom Sep 28, 2022
Merged
Conversation
Member
This commit adds logic to rewrite certain special crontab specs to have the same frequency but a different point in that interval. This is useful to even out the burst of logs we'd surely recieve if all clusters logged at the same time. We don't anticipate that folks will set their own schedules, but for tenants, there is no good reason to let them control the schedules. Usages of @hourly, @daily, or @Weekly will be spread out accordingly. The algorithm hashes the cluster ID to seed a random number generator which is used to determine the point in the interval for the schedule to occur. Fixes cockroachdb#85788 Release note: None
e04ce55 to
199506a
Compare
| 81cfbe24-3ea8-11ed-b878-0242ac120002 | ||
| ---- | ||
| @hourly @daily @weekly | ||
| 440aaea9-06f5-43c1-94d4-fb2b57601ebd 22 * * * * 22 10 * * * 22 10 * * 5 |
Contributor
There was a problem hiding this comment.
for @weekly why do we distribute on month? shouldn't we distribute on day/hour instead?
Contributor
Author
There was a problem hiding this comment.
https://crontab.guru/#22_10_*_*_5
I don't think I distribute on month. The last column IIUC, is day of the week.
Contributor
There was a problem hiding this comment.
heh, I think I looked at some bad oracle doc...
chengxiong-ruan
approved these changes
Sep 28, 2022
Contributor
Author
|
TFTR! bors r+ |
Contributor
|
Build failed (retrying...): |
postamar
approved these changes
Sep 28, 2022
postamar
left a comment
There was a problem hiding this comment.
LGTM.
Is any of this worth documenting? I don't think so but I'll ask anyway.
Contributor
Author
I'm not particularly eager to. I vote we wait on that. |
Contributor
|
Build succeeded: |
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.
This commit adds logic to rewrite certain special crontab specs to have the same frequency but a different point in that interval. This is useful to even out the burst of logs we'd surely recieve if all clusters logged at the same time. We don't anticipate that folks will set their own schedules, but for tenants, there is no good reason to let them control the schedules.
Usages of @hourly, @daily, or @Weekly will be spread out accordingly.
The algorithm hashes the cluster ID to seed a random number generator which is used to determine the point in the interval for the schedule to occur.
Fixes #85788
Release note: None