The ILM wait-for-snapshot step aims to ensure that we have captured a snapshot of the final state of the index before proceeding. It does this by waiting for the last successful SLM snapshot to have a timestamp after the corresponding ILM phase transition time. However the SLM snapshot timestamp records when the snapshot completed, which will be some time after the index state was captured, so we cannot be sure that it had reached its final state before being snapshotted.
I believe instead we should wait for an SLM snapshot which started after the ILM phase transition, rather than one which completed after this transition.
Relates #73356 regarding the use of wall-clock timestamps in this area.
Relates #57809 regarding other guarantees offered by the wait-for-snapshot step.
The ILM
wait-for-snapshotstep aims to ensure that we have captured a snapshot of the final state of the index before proceeding. It does this by waiting for the last successful SLM snapshot to have a timestamp after the corresponding ILM phase transition time. However the SLM snapshot timestamp records when the snapshot completed, which will be some time after the index state was captured, so we cannot be sure that it had reached its final state before being snapshotted.I believe instead we should wait for an SLM snapshot which started after the ILM phase transition, rather than one which completed after this transition.
Relates #73356 regarding the use of wall-clock timestamps in this area.
Relates #57809 regarding other guarantees offered by the
wait-for-snapshotstep.