-
Couldn't load subscription status.
- Fork 130
Improve integration with data streams #13
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
|
Please note that the newly added integration tests are expected to fail. Changes to add data streams' support in OpenSearch have been merged recently (opensearch-project/OpenSearch#690), but the latest artifacts are yet to be made available. The test clusters launched from the existing artifact ( |
Codecov Report
@@ Coverage Diff @@
## main #13 +/- ##
============================================
- Coverage 77.31% 77.27% -0.05%
- Complexity 1557 1561 +4
============================================
Files 201 201
Lines 8588 8603 +15
Branches 1326 1331 +5
============================================
+ Hits 6640 6648 +8
- Misses 1250 1256 +6
- Partials 698 699 +1 Continue to review full report at Codecov.
|
...lin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt
Outdated
Show resolved
Hide resolved
...lin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt
Show resolved
Hide resolved
...lin/org/opensearch/indexmanagement/indexstatemanagement/step/rollover/AttemptRolloverStep.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/org/opensearch/indexmanagement/indexstatemanagement/ISMTemplateService.kt
Outdated
Show resolved
Hide resolved
| client().makeRequest( | ||
| "PUT", | ||
| "/_index_template/rollover-data-stream-template", | ||
| StringEntity("{ \"index_patterns\": [ \"$dataStreamName\" ], \"data_stream\": { } }", ContentType.APPLICATION_JSON) |
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.
Curious about index_patterns format here. Take logs-redis for an example, normally we will use logs-redis* as the index pattern with * in the end. But it seems here we use logs-redis, is this sth by design? And logs-redis* is wrong?
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.
The index pattern matches the name of the data stream instead of the backing indices. This is by design and consistent with how index patterns work in index templates as well.
A data stream named logs-redis will have backing indices like .ds-logs-redis-000001, .ds-logs-redis-000002 and so on. When defining an index pattern like index_pattern: ["logs-redis"], I'm just performing an exact match on one data stream.
I could also define index_pattern: ["logs-redis-*"] which would allow me to match multiple data streams (and effectively their backing indices). This would match "logs-redis-prod", "logs-redis-staging" and so on.
src/main/kotlin/org/opensearch/indexmanagement/rollup/actionfilter/FieldCapsFilter.kt
Outdated
Show resolved
Hide resolved
|
Pls help update our release note for rc1 before merge in: https://github.com/opensearch-project/index-management/blob/main/release-notes/opensearch-index-management.release-notes-1.0.0.0-rc1.md Add this part to the release note |
src/main/kotlin/org/opensearch/indexmanagement/rollup/interceptor/RollupInterceptor.kt
Outdated
Show resolved
Hide resolved
src/test/kotlin/org/opensearch/indexmanagement/indexstatemanagement/action/RolloverActionIT.kt
Show resolved
Hide resolved
…reams. Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Signed-off-by: Ketan Verma <ketan9495@gmail.com>
|
We have looked into the one failure in multi-node tests. This is a flakey one, doesn't seem to be related to changes in this PR. After adding some log, we see the failed reason is first_index is still transitioning when we are making the change policy API call. But this cannot happen if the test is being executed sequentially. So it seems multi-node test can somehow execute the test somewhat parrelly. Will need to look into this in the future. |
* Fixed ISM policy association and improved rollover action for data streams. * Fixed index expression resolution for data streams during rollups. * Address PR comments. Signed-off-by: Ketan Verma <ketan9495@gmail.com>
Description
This PR aims to resolve the limitations/enhancements pointed out in #12. Here's a short summary.
rollover_aliasindex setting.Issues
CheckList
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.
Signed-off-by: Ketan Verma ketan9495@gmail.com