Snapshot restore behavior change in Elasticsearch 7.0+ affecting post‑restore cluster health
0 reputation · 07 Mar 2023, 01:02 UTC
Goal: confirm that a restored index contains all expected documents without waiting for the restore operation to finish, while accepting that replica shards may remain unallocated and cluster health may show yellow.
Constraints: the restore API returns immediately by default in Elasticsearch 7.0+, and verification queries must not interfere with ongoing shard allocation; it is unclear whether a match‑all request issued right after the API response reliably reflects the restored data or whether it should be delayed until replica allocation completes.
Questions:
• Is it safe to execute a match‑all query immediately after the restore call returns, or should verification wait for a specific cluster state?
• Can yellow health caused by unallocated replicas be tolerated for verification purposes, or must the cluster be green before checking document counts?
• Does explicitly setting wait_for_completion=true change the verification timing or guarantee that the index is fully queryable right after the restore finishes?