-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Use atomic field avoid (*AlertingRule).mtx wait when template expanding #10858
Use atomic field avoid (*AlertingRule).mtx wait when template expanding #10858
Conversation
…ng (prometheus#10703) Signed-off-by: hanjm <hanjinming@outlook.com>
Signed-off-by: hanjm <hanjinming@outlook.com>
Signed-off-by: hanjm <hanjinming@outlook.com>
Signed-off-by: hanjm <hanjinming@outlook.com>
Signed-off-by: hanjm <hanjinming@outlook.com>
Signed-off-by: hanjm <hanjinming@outlook.com>
Started reviewing, not been able to finish yet. |
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, @pracucci what do you think?
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.
Sorry for the late review, LGTM! FYI @roidelapluie
close(startQueryCh) | ||
select { | ||
case <-getDoneCh: | ||
case <-time.After(time.Millisecond * 10): |
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.
This acts as a timeout, in case the other goroutines gets blocked reading properties from the AlertingRule
. To avoid false positives on slow execution environments, I would significantly increase this timeout, to something like 1s.
Thanks! |
Fix #10703
As the PR #10710 CI funcbench-status is broken and could not remove it, close the old one and open this PR.