-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Adding support for index.number_of_replicas to data stream settings #132748
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
Adding support for index.number_of_replicas to data stream settings #132748
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
…ream_and_write_indices
…b.com:masseyke/elasticsearch into data-stream-settings-index_number_of_replicas
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.
Pull Request Overview
This PR adds support for configuring index.number_of_replicas in the data stream settings API, with the unique behavior of applying only to the write index and future indices. It introduces a new response section to distinguish settings that apply to different scopes of backing indices.
- Adds
index.number_of_replicasas a write-index-only setting - Introduces a new response array
applied_to_data_stream_and_write_indicesin the API response - Updates serialization to handle backward compatibility with the new field
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TransportUpdateDataStreamSettingsAction.java | Implements the core logic for write-index-only settings and differentiates between write and non-write indices |
| UpdateDataStreamSettingsAction.java | Updates the response structure and serialization to include the new applied_to_data_stream_and_write_indices field |
| TransportVersions.java | Adds version constant for backward compatibility |
| UpdateDataStreamSettingsActionResponseTests.java | Updates test to cover the new response field |
| 240_data_stream_settings.yml | Adds integration test for the new write-index-only setting behavior |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
...t/java/org/elasticsearch/action/datastreams/UpdateDataStreamSettingsActionResponseTests.java
Outdated
Show resolved
Hide resolved
...t/java/org/elasticsearch/action/datastreams/UpdateDataStreamSettingsActionResponseTests.java
Outdated
Show resolved
Hide resolved
...t/java/org/elasticsearch/action/datastreams/UpdateDataStreamSettingsActionResponseTests.java
Show resolved
Hide resolved
lukewhiting
left a comment
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 👍🏻
…improv * upstream/main: (58 commits) Fixing flaky LoggedExec (tests) (elastic#133215) CPS search should not use `skip_unavailable` (elastic#132927) Don't fail search if bottom doc can't be formatted (elastic#133188) Mute org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT testGroupByNothing elastic#133225 Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedSetDocValuesWithSkipperSmall elastic#133224 Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedNumberMergeAwayAllValuesWithSkipper elastic#133223 Adding support for index.number_of_replicas to data stream settings (elastic#132748) Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedDocValuesSingleUniqueValue elastic#133221 Fix VectorSimilarityFunctionsIT (elastic#133206) Mute org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT testGroupBySubset elastic#133220 Increase the number of FORK branches in ForkGenerator (elastic#132019) Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=STORED]} elastic#133218 Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=DOC_VALUES]} elastic#133217 Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=NONE]} elastic#133216 Set default processor allocation for test clusters (elastic#133204) Add mapper for exponential histograms (elastic#132493) Fix offset handling in Murmur3Hasher (elastic#133193) unmute testDoesNotResolveClosedIndex (elastic#133115) Fix an AWS SDK v2 release note (elastic#133155) Limit the depth of a filter (elastic#133113) ...
* upstream/main: (58 commits) Fixing flaky LoggedExec (tests) (elastic#133215) CPS search should not use `skip_unavailable` (elastic#132927) Don't fail search if bottom doc can't be formatted (elastic#133188) Mute org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT testGroupByNothing elastic#133225 Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedSetDocValuesWithSkipperSmall elastic#133224 Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedNumberMergeAwayAllValuesWithSkipper elastic#133223 Adding support for index.number_of_replicas to data stream settings (elastic#132748) Mute org.elasticsearch.index.codec.tsdb.es819.ES819TSDBDocValuesFormatTests testSortedDocValuesSingleUniqueValue elastic#133221 Fix VectorSimilarityFunctionsIT (elastic#133206) Mute org.elasticsearch.xpack.esql.action.RandomizedTimeSeriesIT testGroupBySubset elastic#133220 Increase the number of FORK branches in ForkGenerator (elastic#132019) Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=STORED]} elastic#133218 Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=DOC_VALUES]} elastic#133217 Mute org.elasticsearch.index.mapper.blockloader.IpFieldBlockLoaderTests testBlockLoader {preference=Params[syntheticSource=true, preference=NONE]} elastic#133216 Set default processor allocation for test clusters (elastic#133204) Add mapper for exponential histograms (elastic#132493) Fix offset handling in Murmur3Hasher (elastic#133193) unmute testDoesNotResolveClosedIndex (elastic#133115) Fix an AWS SDK v2 release note (elastic#133155) Limit the depth of a filter (elastic#133113) ...
This adds the ability to set index.number_of_replicas in the data stream settings API. Unlike any other settings we support, this one applies to the write index (and any future indices) only. It does not apply to other backing indices.
It also adds a new section to the response of the put data streams settings API. That API will now include a
applied_to_data_stream_and_write_indexarray, alongside the previously-existingapplied_to_data_stream_onlyandapplied_to_data_stream_and_backing_indicesarrays.