Skip to content

deploy(mvp): wipe persistent backend state on teardown - #476

Merged
zzylol merged 1 commit into
mainfrom
deploy/wipe-backend-state-on-teardown
Jun 7, 2026
Merged

zzylol merged 1 commit into
mainfrom
deploy/wipe-backend-state-on-teardown

Conversation

@zzylol

@zzylol zzylol commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

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 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_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.

Pairs with ASAPQuery-backend #363 (merger compact-on-startup) — together they keep the merger's footprint VM-comparable across restarts.

🤖 Generated with Claude Code

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>
@zzylol
zzylol merged commit 4feb10d into main Jun 7, 2026
@zzylol
zzylol deleted the deploy/wipe-backend-state-on-teardown branch June 7, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant