Question
Prepared query results inconsistent after Consul snapshot restore
Cig Cedar
0 reputation · 08 Oct 2021, 20:20 UTC
78.4K views0
Operators need to confirm whether Consul automatically reconstructs the internal indexes that support prepared queries after a snapshot restore, to ensure that query responses reflect the restored state without requiring agent restarts. The snapshot restore process replaces the Raft state and brings the cluster back online, but documentation does not specify if the prepared-query subsystem rebuilds its indexes as part of the recovery.
Because the indexes are stored in memory and are typically built when a prepared query is first executed or when the agent starts, there is uncertainty about whether a simple restore leaves them stale, potentially causing outdated or empty results until the queries are re-run or the agents are restarted. Operators must decide if additional steps are necessary to guarantee index consistency.
Does Consul rebuild prepared-query indexes automatically after a snapshot restore? If not, what is the minimal action required to trigger index rebuild without restarting the Consul agents? How can operators verify that the prepared-query indexes are up-to-date after a restore?