Skip to content

[server] Ensure KV tablet dir is removed before log and surface clean…#3484

Open
gyang94 wants to merge 1 commit into
apache:mainfrom
gyang94:remove-kv-orphan
Open

[server] Ensure KV tablet dir is removed before log and surface clean…#3484
gyang94 wants to merge 1 commit into
apache:mainfrom
gyang94:remove-kv-orphan

Conversation

@gyang94

@gyang94 gyang94 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

When cleaning residual data for a dropped table/partition during startup, delete the KV tablet directory before dropping the log, and only drop the log once the KV directory is confirmed gone. KV deletion failures are now logged (warn) instead of being silently swallowed, keeping the log as an anchor so the cleanup can be retried.

Also propagate KV deletion failures in ReplicaManager.sweepOrphanTabletDirs so the log is not dropped when orphan KV cleanup fails.

Purpose

Linked issue: close #xxx

Brief change log

delete kv tablet dir first, if success, then delete the log dir.

Tests

API and Format

Documentation

@gyang94 gyang94 force-pushed the remove-kv-orphan branch from 8249b67 to 2a4dcfc Compare June 15, 2026 02:39
…up failures

When cleaning residual data for a dropped table/partition during startup, delete
the KV tablet directory before dropping the log, and only drop the log once the KV
directory is confirmed gone. KV deletion failures are now logged (warn) instead of
being silently swallowed, keeping the log as an anchor so the cleanup can be retried.

Also propagate KV deletion failures in ReplicaManager.sweepOrphanTabletDirs so the
log is not dropped when orphan KV cleanup fails.
@gyang94 gyang94 force-pushed the remove-kv-orphan branch from 2a4dcfc to 537d90f Compare June 15, 2026 03:25
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