Skip to content

Batch metadata deletes in the LMCache adapter - #3433

Open
matrixarkai wants to merge 7 commits into
mainfrom
codex/lmcache-batch-deletes
Open

matrixarkai wants to merge 7 commits into
mainfrom
codex/lmcache-batch-deletes

Conversation

@matrixarkai

@matrixarkai matrixarkai commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Changes

  • Group metadata deletion requests for successfully removed blobs in sets of up to 128.

  • Preserve pinned entries and reserve selected keys through deletion and accounting.

  • If a metadata batch can only be partially acknowledged, reconcile its idempotent metadata deletes individually. Only confirmed removals reduce the adapter budget.

  • Retry a cache existence lookup once when an idle metadata connection has closed. Batch write behavior is unchanged.

Validation

  • All 15 tests passed. New tests cover pinned keys, duplicate keys, failed blob deletion, and a partially committed metadata batch.
  • A 12-client WSL test verified 12,288 chunks through store, lookup, load, unlock, delete, and post-delete lookup. P95 for 32-chunk deletes fell from 757 ms to 376 ms. Delete-phase CPU fell from 36.7 to 17.1 CPU-seconds.
  • Across three datanodes in local WSL, 24 clients completed 98,304 keys per operation. Payload verification, post-delete misses, and on-disk removal all passed with zero adapter errors. At that load, 32-chunk delete p95 was 835 ms.
  • The datanode closed two idle metadata sockets. The updated SDK returned a live-key hit on the first lookup after reconnecting. The JSON and MessagePack retry tests passed. The SDK suite reported 85 passes and 65 skips.

@matrixarkai
matrixarkai changed the base branch from codex/lmcache-blob-mutations to main November 23, 2026 19:28
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.

2 participants