-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Fixing get data stream API when data stream index mode has been changed to time_series #137852
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
Merged
elasticsearchmachine
merged 3 commits into
elastic:main
from
masseyke:data-stream-apis-when-changing-mode-to-time-series
Nov 11, 2025
Merged
Fixing get data stream API when data stream index mode has been changed to time_series #137852
elasticsearchmachine
merged 3 commits into
elastic:main
from
masseyke:data-stream-apis-when-changing-mode-to-time-series
Nov 11, 2025
Conversation
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
…ged to time_series
Collaborator
|
Pinging @elastic/es-data-management (Team:Data Management) |
Collaborator
|
Hi @masseyke, I've created a changelog YAML for you. |
dakrone
approved these changes
Nov 10, 2025
Member
dakrone
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, I left one comment about a typo
Co-authored-by: Lee Hinman <[email protected]>
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
masseyke
added a commit
to masseyke/elasticsearch
that referenced
this pull request
Nov 11, 2025
…ed to time_series (elastic#137852) This fixes an edge case introduced by elastic#137407. If a data stream is created with the standard `index_mode`, and then the template changes the mode to `time_series` without a `routing_path` and the data stream is not rolled over, then the get data stream API and the get data stream mappings API will fail with errors mentioning something like `failed to apply settings java.lang.IllegalArgumentException: [index.mode=time_series] requires a non-empty [index.routing_path]`. Below is an example stack trace: ``` [2025-11-10T12:51:39,973][WARN ][o.e.c.s.IndexScopedSettings] [runTask-0] [.ds-quickstart-2-2025.11.10-000001] failed to apply settings java.lang.IllegalArgumentException: [index.mode=time_series] requires a non-empty [index.routing_path] at [email protected]/org.elasticsearch.index.IndexMode$2.validateWithOtherSettings(IndexMode.java:156) at [email protected]/org.elasticsearch.index.IndexSettings$3.validate(IndexSettings.java:751) at [email protected]/org.elasticsearch.index.IndexSettings$3.validate(IndexSettings.java:745) at [email protected]/org.elasticsearch.common.settings.Setting.get(Setting.java:589) at [email protected]/org.elasticsearch.common.settings.Setting.get(Setting.java:561) at [email protected]/org.elasticsearch.index.mapper.MapperService.lambda$static$0(MapperService.java:134) at [email protected]/org.elasticsearch.common.settings.Setting.innerGetRaw(Setting.java:657) at [email protected]/org.elasticsearch.common.settings.Setting.getRaw(Setting.java:632) at [email protected]/org.elasticsearch.common.settings.Setting$Updater.hasChanged(Setting.java:1317) at [email protected]/org.elasticsearch.common.settings.AbstractScopedSettings$SettingUpdater.updater(AbstractScopedSettings.java:683) at [email protected]/org.elasticsearch.common.settings.AbstractScopedSettings.applySettings(AbstractScopedSettings.java:168) at [email protected]/org.elasticsearch.index.IndexSettings.updateIndexMetadata(IndexSettings.java:1495) at [email protected]/org.elasticsearch.cluster.metadata.DataStream.lambda$getEffectiveMappings$1(DataStream.java:520) at [email protected]/org.elasticsearch.indices.IndicesService.withTempIndexService(IndicesService.java:773) at [email protected]/org.elasticsearch.cluster.metadata.DataStream.getEffectiveMappings(DataStream.java:495) at [email protected]/org.elasticsearch.cluster.metadata.MetadataDataStreamsService.getEffectiveSettings(MetadataDataStreamsService.java:612) at [email protected]/org.elasticsearch.cluster.metadata.MetadataDataStreamsService.getEffectiveSettings(MetadataDataStreamsService.java:593) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.innerOperation(TransportGetDataStreamsAction.java:283) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.localClusterStateOperation(TransportGetDataStreamsAction.java:179) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.localClusterStateOperation(TransportGetDataStreamsAction.java:72) at [email protected]/org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction.localClusterStateOperation(TransportLocalProjectMetadataAction.java:59) at [email protected]/org.elasticsearch.action.support.local.TransportLocalClusterStateAction.lambda$innerDoExecute$0(TransportLocalClusterStateAction.java:92) at [email protected]/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:101) at [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1076) at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614) at java.base/java.lang.Thread.run(Thread.java:1474) ``` (cherry picked from commit f2afb88)
elasticsearchmachine
pushed a commit
that referenced
this pull request
Nov 11, 2025
…ed to time_series (#137852) (#137898) This fixes an edge case introduced by #137407. If a data stream is created with the standard `index_mode`, and then the template changes the mode to `time_series` without a `routing_path` and the data stream is not rolled over, then the get data stream API and the get data stream mappings API will fail with errors mentioning something like `failed to apply settings java.lang.IllegalArgumentException: [index.mode=time_series] requires a non-empty [index.routing_path]`. Below is an example stack trace: ``` [2025-11-10T12:51:39,973][WARN ][o.e.c.s.IndexScopedSettings] [runTask-0] [.ds-quickstart-2-2025.11.10-000001] failed to apply settings java.lang.IllegalArgumentException: [index.mode=time_series] requires a non-empty [index.routing_path] at [email protected]/org.elasticsearch.index.IndexMode$2.validateWithOtherSettings(IndexMode.java:156) at [email protected]/org.elasticsearch.index.IndexSettings$3.validate(IndexSettings.java:751) at [email protected]/org.elasticsearch.index.IndexSettings$3.validate(IndexSettings.java:745) at [email protected]/org.elasticsearch.common.settings.Setting.get(Setting.java:589) at [email protected]/org.elasticsearch.common.settings.Setting.get(Setting.java:561) at [email protected]/org.elasticsearch.index.mapper.MapperService.lambda$static$0(MapperService.java:134) at [email protected]/org.elasticsearch.common.settings.Setting.innerGetRaw(Setting.java:657) at [email protected]/org.elasticsearch.common.settings.Setting.getRaw(Setting.java:632) at [email protected]/org.elasticsearch.common.settings.Setting$Updater.hasChanged(Setting.java:1317) at [email protected]/org.elasticsearch.common.settings.AbstractScopedSettings$SettingUpdater.updater(AbstractScopedSettings.java:683) at [email protected]/org.elasticsearch.common.settings.AbstractScopedSettings.applySettings(AbstractScopedSettings.java:168) at [email protected]/org.elasticsearch.index.IndexSettings.updateIndexMetadata(IndexSettings.java:1495) at [email protected]/org.elasticsearch.cluster.metadata.DataStream.lambda$getEffectiveMappings$1(DataStream.java:520) at [email protected]/org.elasticsearch.indices.IndicesService.withTempIndexService(IndicesService.java:773) at [email protected]/org.elasticsearch.cluster.metadata.DataStream.getEffectiveMappings(DataStream.java:495) at [email protected]/org.elasticsearch.cluster.metadata.MetadataDataStreamsService.getEffectiveSettings(MetadataDataStreamsService.java:612) at [email protected]/org.elasticsearch.cluster.metadata.MetadataDataStreamsService.getEffectiveSettings(MetadataDataStreamsService.java:593) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.innerOperation(TransportGetDataStreamsAction.java:283) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.localClusterStateOperation(TransportGetDataStreamsAction.java:179) at [email protected]/org.elasticsearch.datastreams.action.TransportGetDataStreamsAction.localClusterStateOperation(TransportGetDataStreamsAction.java:72) at [email protected]/org.elasticsearch.action.support.local.TransportLocalProjectMetadataAction.localClusterStateOperation(TransportLocalProjectMetadataAction.java:59) at [email protected]/org.elasticsearch.action.support.local.TransportLocalClusterStateAction.lambda$innerDoExecute$0(TransportLocalClusterStateAction.java:92) at [email protected]/org.elasticsearch.action.ActionRunnable$4.doRun(ActionRunnable.java:101) at [email protected]/org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:1076) at [email protected]/org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:27) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614) at java.base/java.lang.Thread.run(Thread.java:1474) ``` (cherry picked from commit f2afb88)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
auto-merge-without-approval
Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!)
>bug
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
v9.2.2
v9.3.0
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 fixes an edge case introduced by #137407. If a data stream is created with the standard
index_mode, and then the template changes the mode totime_serieswithout arouting_pathand the data stream is not rolled over, then the get data stream API and the get data stream mappings API will fail with errors mentioning something likefailed to apply settings java.lang.IllegalArgumentException: [index.mode=time_series] requires a non-empty [index.routing_path]. Below is an example stack trace: