Skip to content

[Store] Wait for ordered log completion callbacks - #5774

Closed
MaskVulcan wants to merge 1 commit into
kvcache-ai:mainfrom
MaskVulcan:ssd/oplog-finalization
Closed

MaskVulcan wants to merge 1 commit into
kvcache-ai:mainfrom
MaskVulcan:ssd/oplog-finalization

Conversation

@MaskVulcan

@MaskVulcan MaskVulcan commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Expose bounded waits for the ordered log's durability and callback completion.
A durable delete can still have its allocation held by a queued callback.
Waiting for finalization lets the caller observe that cleanup before allowing
a same-key rewrite.

The callback completion sequence advances in log order. A later terminal
failure does not skip an earlier durable callback, and Stop wakes waits for
records that cannot become durable. This is a prerequisite for the SSD HA
generation work in RFC #5768.

Suggested Merge Priority

  • P2 — Normal

Module

  • Mooncake Store

Type of Change

  • New feature

How Has This Been Tested?

The Release ordered_oplog_writer_test target passed all 58 cases, including
four new cases for callback drain, stop before start, timeout bounds, and a
later failure while an earlier callback is pending. Scoped pre-commit passed.

Checklist

AI Assistance Disclosure

Codex assisted with extracting and validating the change.

Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
@MaskVulcan

Copy link
Copy Markdown
Collaborator Author

Consolidated into Draft PR #5791 (Part 5 of the 5-PR SSD Offload series tracked in RFC #5768).

@MaskVulcan MaskVulcan closed this Nov 24, 2026
MaskVulcan added a commit to MaskVulcan/Mooncake that referenced this pull request Nov 25, 2026
…urable retirement

Implement the generation-scoped SSD recovery and HA retirement stage of
RFC kvcache-ai#5768 on top of the compatible wire/codec foundation and prerequisites
kvcache-ai#5774 and kvcache-ai#5775:
- Mint per-write generations on PutStart/UpsertStart and enforce matching
  captured grants on PutEnd/PutRevoke and batch/session variants.
- Key SSD offload records with length-delimited generation storage keys,
  fence offload and promotion completion/failure notifications by object
  generation and task_id (allowing holder release of unallocated prefetch
  tasks), and prevent stale scans from resurrecting deleted/removed objects.
- Wait for ordered OpLog durability and callback finalization before
  retiring overwritten/removed allocations in HA mode, bounded by
  oplog_durable_wait_timeout_ms.
- Add docs/source/design/store/ssd-generations.md, unit/integration tests,
  and adapt existing tests to forward captured primary write grants.

Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
MaskVulcan added a commit to MaskVulcan/Mooncake that referenced this pull request Nov 25, 2026
…urable retirement

Implement the generation-scoped SSD recovery and HA retirement stage of
RFC kvcache-ai#5768 on top of the compatible wire/codec foundation and prerequisites
kvcache-ai#5774 and kvcache-ai#5775:
- Mint per-write generations on PutStart/UpsertStart and enforce matching
  captured grants on PutEnd/PutRevoke and batch/session variants.
- Key SSD offload records with length-delimited generation storage keys,
  fence offload and promotion completion/failure notifications by object
  generation and task_id (allowing holder release of unallocated prefetch
  tasks), and prevent stale scans from resurrecting deleted/removed objects.
- Wait for ordered OpLog durability and callback finalization before
  retiring overwritten/removed allocations in HA mode, bounded by
  oplog_durable_wait_timeout_ms.
- Add docs/source/design/store/ssd-generations.md, unit/integration tests,
  and adapt existing tests to forward captured primary write grants.

Signed-off-by: MaskVulcan <9528071+MaskVulcan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci size/M 100-1000 changed lines (additions + deletions) Store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant