[Fleet] Datastream rollovers for an integration do not rollover with the right namespace #89436
Labels
bug
Fixes for quality problems that affect the customer experience
Team:Fleet
Team label for Observability Data Collection Fleet team
When upgrading a package, if mappings are incompatible, a rollover must take place on the data stream. The current query for data stream constant keywords to create the data stream name needs to be modified to account for unique namespaces, otherwise requests to the first namespace available will happen as many times as there are unique namespaces for the data stream.
We want to avoid parsing the indices to get the namespace in order to compose the data stream name, but we do not know what the namespace value is, hence the need for the query. What we need to solve for is the data stream name. After trying to update the mappings of each current write index of each data stream (this part is happening correctly), if one of those fails, prompting a rollover, compose the corresponding data stream by getting the namespace value and without parsing the index name for that value. We assumed there could be some risk in parsing the index name, but perhaps we should be open to it.
Perhaps we can think of a better way to query for the current indices of each data stream so that its corresponding constant keywords, like namespace, are returned with it.
Another option might be to keep a list of data streams needing rolled over and perform rollovers in a separate function. Dedup by the index pattern in the corresponding index template, and query to aggregate by namespace.
query
res
There are integration tests for rollovers, but not one that handles the use case of multiple namespaces
The text was updated successfully, but these errors were encountered: