Skip to content
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

Fix timing issue in MessageCountAlertCondition #2546

Merged
merged 1 commit into from Jul 27, 2016
Merged

Fix timing issue in MessageCountAlertCondition #2546

merged 1 commit into from Jul 27, 2016

Conversation

@bernd
Copy link
Member

@bernd bernd commented Jul 26, 2016

This condition works by first running a count in Elasticsearch and then,
if the condition triggers, a search to fetch the messages that will be
included in the check result.

Both queries use a RelativeRange object which returns a new time for
every getFrom() and getTo() call that is made. This can result in
different messages being included in the check result or no messages at
all given the count query takes a while.

The RelativeRange is now converted to an AbsoluteRange object which is
then used to run the count and search query. This makes sure the exact
same time range is used no matter how much time is in between the calls.

Refs #1704
Fixes #2382

This condition works by first running a count in Elasticsearch and then,
if the condition triggers, a search to fetch the messages that will be
included in the check result.

Both queries use a RelativeRange object which returns a new time for
every getFrom() and getTo() call that is made. This can result in
different messages being included in the check result or no messages at
all given the count query takes a while.

The RelativeRange is now converted to an AbsoluteRange object which is
then used to run the count and search query. This makes sure the exact
same time range is used no matter how much time is in between the calls.

Refs #1704
Fixes #2382
@bernd bernd added this to the 2.1.0 milestone Jul 26, 2016
@edmundoa edmundoa self-assigned this Jul 27, 2016
@edmundoa
Copy link
Member

@edmundoa edmundoa commented Jul 27, 2016

LGTM 👍

@edmundoa edmundoa merged commit e55ec52 into master Jul 27, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/push The Travis CI build passed
Details
@edmundoa edmundoa deleted the issue-2382 branch Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants