-
Notifications
You must be signed in to change notification settings - Fork 103
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
optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input #1701
Conversation
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.
Changes LGTM. Approving for when the separate PRs to fix the build error is merged.
@@ -1190,6 +1191,133 @@ class MonitorRunnerServiceIT : AlertingRestTestCase() { | |||
assertEquals("Incorrect search result", 2, buckets.size) | |||
} | |||
|
|||
fun `test execute bucket-level monitor with alias optimization - indices not skipped`() { |
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.
can we add a test case with partial index consideration e.g. after the current monitor run, 5 new docs are added to index1
, index1 is rolled over to index2
, 5 new docs added to index2
, index2 is rolled over to index3
, 5 new docs added to index3
, index3 is rolled over to index4
, 5 new docs added to index4
& now bucket-level monitor run
happens. So, this run considers, index1, index2, index3 & index4
.
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.
added 2 test scenarios
scenario one
12 indices in alias
1st index skipped as creation time out of time range of query contains 3 docs (3 new buckets in response)
2nd index NOT SKIPPED with creation time out of time range of query contains 3 docs (3 new buckets in response)
10 indices contains 2 docs (2 new buckets in response)
Response has only 5 buckets
scenario 2
12 indices in alias
1st index NOT SKIPPED as creation time in time range of query contains 3 docs (3 new buckets in response)
2nd index NOT SKIPPED with creation time in time range of query contains 3 docs (3 new buckets in response)
10 indices contains 2 docs (2 new buckets in response)
Response has only 8 buckets
…me-series indices that contain docs within timeframe of range query filter in search input Signed-off-by: Surya Sashank Nistala <[email protected]>
Signed-off-by: Surya Sashank Nistala <[email protected]>
…ces being skipped and not skipped Signed-off-by: Surya Sashank Nistala <[email protected]>
4de98fc
to
4578bc8
Compare
Signed-off-by: Surya Sashank Nistala <[email protected]>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input Signed-off-by: Surya Sashank Nistala <[email protected]> * add tests to verify alias based optimziation scenarios Signed-off-by: Surya Sashank Nistala <[email protected]> * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped Signed-off-by: Surya Sashank Nistala <[email protected]> * null check addded Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit e3c9fc2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input Signed-off-by: Surya Sashank Nistala <[email protected]> * add tests to verify alias based optimziation scenarios Signed-off-by: Surya Sashank Nistala <[email protected]> * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped Signed-off-by: Surya Sashank Nistala <[email protected]> * null check addded Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit e3c9fc2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input Signed-off-by: Surya Sashank Nistala <[email protected]> * add tests to verify alias based optimziation scenarios Signed-off-by: Surya Sashank Nistala <[email protected]> * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped Signed-off-by: Surya Sashank Nistala <[email protected]> * null check addded Signed-off-by: Surya Sashank Nistala <[email protected]> --------- Signed-off-by: Surya Sashank Nistala <[email protected]> (cherry picked from commit e3c9fc2) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) (#1712) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input * add tests to verify alias based optimziation scenarios * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped * null check addded --------- (cherry picked from commit e3c9fc2) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) (#1713) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input * add tests to verify alias based optimziation scenarios * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped * null check addded --------- (cherry picked from commit e3c9fc2) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…me-series indices that contain docs within timeframe of range query filter in search input (#1701) (#1711) * optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input * add tests to verify alias based optimziation scenarios * fix tests to verify aggregation query on alias optimziation with indices being skipped and not skipped * null check addded --------- (cherry picked from commit e3c9fc2) Signed-off-by: Surya Sashank Nistala <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
optimize bucket level monitor to resolve alias to query only those time-series indices that contain docs within timeframe of range query filter in search input
Related Issues
#1710
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.