Description
Data streams in general only write on the latest backing index. However, this is not true for the time series data streams (TSDS). The backing indices of a TSDS have time ranges (start_time
& end_time
) and they include documents that belong to these time ranges.
To ensure that we will not unfollow a leader TSDB index before the indexing is complete, we need to add a WaitUntilTimeSeriesEndTimePassesStep
to the unfollow action. This will ensure that we will only unfollow after the end_time
has passed.
This creates some weird semantics with the combination of the rollover and the unfollow. Because we need the rollover of the leader index to finalise the end_time
but the unfollow action is injected before the rollover. However, this should be fine, because the leader index will skip the unfollow action so it will rollover and finalise the end_time
and the follower index will wait the end_time
to pass before it unfollows. Rolling over the follower index will have no effect since it’s already rolled over.