﻿# Invalidate stale watch caches after an etcd restore

After an etcd restore, revision bump and compaction signaling address watch-cache continuity; they do not recover writes missing from the snapshot.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-dc-etcd-restore-watch-revisions/
Language: en

An etcd restore opens successfully, but Kubernetes controllers retain inconsistent cached views. The restored snapshot has an older revision than clients previously observed. Recovery must account for watch consumers and local caches, not merely a readable database. The version-scoped etcd recovery mechanism separates revision advancement from invalidation of obsolete watch history.

## Recognize the revision rollback

A snapshot contains lineage only up to its acquisition boundary. Restoring it can make clients perceive the keyspace revision moving backward. A client that already observed later revisions does not necessarily refresh its local state correctly just because the restored datastore accepts connections. Preserve the pre-restore and snapshot revision context when diagnosing apparently contradictory controller behavior.

## Identify watch-based consumers

Kubernetes controllers commonly use informers with local caches updated through watches. The etcd recovery documentation calls out this relationship explicitly. A healthy process and a reachable API are therefore insufficient evidence that every consumer rebuilt its view. Map the consumers relevant to the affected serving resources rather than assuming a datastore restart automatically resets all downstream application state.

## Understand the revision bump

The documented bump-revision restore option advances the snapshot's logical revision by a supplied amount. Its purpose is revision continuity for consumers, not recovering changes absent from the snapshot. The amount must follow the relevant history and workload evidence; a documentation example is not a universal value. Do not report an advanced revision as proof that missing routing or model configuration updates were recovered.

## Preserve compaction signaling

The mark-compacted option marks revisions through the bump as compacted. The recovery guide describes this as terminating watches and invalidating informer caches in the relevant Kubernetes recovery context. This is a different effect from merely increasing the revision number. Preserve the chosen recovery contract and tool version rather than treating the two options as interchangeable spellings for a generic cache refresh.

## Verify downstream reconstruction

An isolated recovery assessment should distinguish restored data, revision handling, watch termination and rebuilt controller views before application readiness is claimed. This article explains the mechanism without restoring a cluster or manipulating live watches. Retain which resources were checked and which consumers remain unobserved. A valid revision strategy supports recovery correctness, while actual inference service still needs its own routing, model and completion evidence.

## Primary references

[etcd v3.6 Disaster Recovery](https://etcd.io/docs/v3.6/op-guide/recovery/).

[etcd v3.6 Revisions and Watch API](https://etcd.io/docs/v3.6/learning/api/).

[etcd v3.6 API Guarantees](https://etcd.io/docs/v3.6/learning/api_guarantees/).

Related reading: [RAID1 for models: disk availability and version recovery](/journal/raid1-model-backup-boundary/); [Startup, readiness and liveness for a slow-loading model server](/journal/provider-startup-readiness-liveness-separation/).
