deploy(mvp): wipe persistent backend state on teardown - #476
Merged
Merged
Conversation
The ASAP backend keeps two state dirs as HOST bind-mounts that survive container removal: data/gorilla-merger (the merger's pending/shipped TSDB blocks + WAL) and data/sketch-persistence (the data_plane's flushed sketch index). Unlike the raw baselines (MinIO/Thanos/VM run container-local and are removed with the container), these accumulated across EVERY up/down cycle — the merger grew to multiple GB over a day of runs because its per-window blocks were never cleared between runs, which also inflated cold-query memory. backend_down now clears both dirs (after the containers are stopped) so each arm starts from the same clean slate as the baselines. KEEP_BACKEND_DATA=1 preserves them for post-run inspection. Falls back to sudo if a strict umask blocks unlinking the merger's uid-65532 subdirs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ASAP backend keeps two state dirs as HOST bind-mounts that survive container removal:
data/gorilla-merger(the merger's pending/shipped TSDB blocks + WAL) anddata/sketch-persistence(the data_plane's flushed sketch index). Unlike the raw baselines (MinIO/Thanos/VM run container-local and vanish with the container), these accumulated across every up/down cycle — the merger grew to multiple GB over a day of runs because its per-window blocks were never cleared between runs, which also inflated cold-query memory.backend_downnow clears both dirs (after the containers are stopped) so each arm starts from the same clean slate as the baselines.KEEP_BACKEND_DATA=1preserves them for post-run inspection. Falls back tosudoif a strict umask blocks unlinking the merger's uid-65532 subdirs.Pairs with ASAPQuery-backend #363 (merger compact-on-startup) — together they keep the merger's footprint VM-comparable across restarts.
🤖 Generated with Claude Code