Datastream temporal_ranges
is wrong in presence of downsampling
#106890
Labels
>bug
:Data Management/Data streams
Data streams and their lifecycles
:StorageEngine/TSDB
You know, for Metrics
Team:Data Management
Meta label for data/management team
Team:StorageEngine
Elasticsearch Version
8.14
Installed Plugins
No response
Java Version
bundled
OS Version
all
Problem Description
Original issue i noticed - every execution of a request like
GET /_data_stream/my-data-stream
for TSDS with downsampling enabled produces a warning of formatprevious backing index [..] range [..] range is colliding with current backing [..] index range [..]
.While looking at this issue i realized that it looks like
temporal_ranges
information for data stream is wrong. See logs section for details.Additionally the log is misleading - information it provides is incorrect, start and end times of indices reported are not actual start and end time for this index.
Steps to Reproduce
Logs (if relevant)
Example
Datastream information (relevant parts):
Time ranges of indices:
downsample-5m-.ds-my-data-stream-2024.03.27-000002:
downsample-5m-.ds-my-data-stream-2024.03.27-000001
.ds-my-data-stream-2024.03.27-000003
.ds-my-data-stream-2024.03.28-000008
We can see that
temporal_ranges
is wrong.start
is2024-03-27T21:34:37.000Z
which is a start time of*000002
index instead of index*000001
with an earlier range. It is likely caused by the order of indices, we probably assume ascending ordering based on time series start and end. It seems like this is not true with downsampling and the root cause is somewhere where we replace backing index of datastream.The text was updated successfully, but these errors were encountered: