Only Allow Enabling Streams If No Conflicting Indices Exist#132064
Merged
lukewhiting merged 14 commits intoelastic:mainfrom Aug 13, 2025
Merged
Only Allow Enabling Streams If No Conflicting Indices Exist#132064lukewhiting merged 14 commits intoelastic:mainfrom
lukewhiting merged 14 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
Collaborator
|
Hi @lukewhiting, I've created a changelog YAML for you. |
szybia
reviewed
Jul 29, 2025
.../src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java
Outdated
Show resolved
Hide resolved
…-streams-enable-check-for-indices
szybia
reviewed
Jul 30, 2025
.../src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java
Outdated
Show resolved
Hide resolved
…-streams-enable-check-for-indices
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR prevents enabling logs streams when conflicting indices already exist, addressing issue ES-12416. The implementation adds validation to check for existing indices named "logs" or starting with "logs." before allowing stream enablement.
- Adds pre-validation to prevent stream enablement conflicts with existing indices
- Implements comprehensive test coverage for the new validation logic
- Exports the streams package for broader accessibility
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| server/src/main/java/module-info.java | Exports the streams package to make it accessible |
| modules/streams/src/yamlRestTest/resources/rest-api-spec/test/streams/logs/10_basic.yml | Adds test cases and teardown for conflict validation scenarios |
| modules/streams/src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java | Implements the core validation logic to prevent enabling streams with conflicting indices |
| modules/streams/build.gradle | Minor quote style fix for consistency |
| docs/changelog/132064.yaml | Documents the enhancement for release notes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.../src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/rest/streams/logs/TransportLogsStreamsToggleActivation.java
Outdated
Show resolved
Hide resolved
…not using a stream
szybia
approved these changes
Aug 13, 2025
…-streams-enable-check-for-indices
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 PR makes it so that the logs streams feature can only be enabled on a cluster if there are not pre-existing indices called
logsor with names startinglogs.*.Fixes ES-12416