Conflicting behavior of data streams and querying for _aliases #57712
Labels
:Data Management/Data streams
Data streams and their lifecycles
Team:Data Management
Meta label for data/management team
Elasticsearch version (
bin/elasticsearch --version
): masterDescription of the problem including expected versus actual behavior:
As soon as some data stream exists, trying to query an alias with
GET /_alias/xyz
results in a400
response. As pointed out by @martijnvg the request is equivalent toGET /*/_alias/xyz
which includes all indices/alias/data streams for aliases with the namexyz
. Based on currently implemented validations querying for an alias on data streams results in an error.The way to prevent this issue is to query
GET xyz/_alias
instead.Unfortunately all beats and APM Server are currently impacted by this behavior. On startup or when running
beat setup
they send a request to check whether an alias exists or not in the above mentioned, conflicting way. As soon as any data stream exists, this results in an error and the beat can't start. While we could change the query for upcoming versions, this might still lead to compatibility issues with current beat versions.Steps to reproduce:
Check the data stream is created
GET _data_stream/*
GET /_alias/bar-test
: returns400 - "The provided expression [foo-test] matches a data stream, specify the corresponding concrete indices instead."
GET bar-test/_alias
: returns200
, works as expected.The text was updated successfully, but these errors were encountered: