Skip to content

fix(csrc): report per-key native SET results - #12

Open
voipmonitor wants to merge 2 commits into
release/v0.5.2-glm52-dcp-basefrom
fix/lmcache-native-set-results-20260729
Open

fix(csrc): report per-key native SET results#12
voipmonitor wants to merge 2 commits into
release/v0.5.2-glm52-dcp-basefrom
fix/lmcache-native-set-results-20260729

Conversation

@voipmonitor

Copy link
Copy Markdown

Summary

Native connector SET batches currently stop at the first failed key and expose only a batch-level failure. Python cannot tell which earlier keys were durably stored, so capacity accounting and writeback recovery can become inconsistent.

This PR:

  • preallocates and returns one SET result per key;
  • continues the tile after an individual key fails;
  • preserves batch-level ok=false for existing consumers;
  • applies the same contract to Mooncake batch_put_from;
  • adds a compiled native-FS regression test proving [success, failure, success] behavior within one tile.

The implementation commits retain Florian Bernd's authorship; the added regression test was developed during the release audit.

Validation

  • Rebuilt LMCache common native extensions in the current GLM-5.2 release image.
  • New compiled-extension test: 1 passed.
  • The same test fails against the current release binary, proving the regression coverage.
  • ruff check and ruff format --check pass.

Scope

This PR only establishes the native per-key completion contract. Python consumption, synchronous durability, restart accounting, and writeback are intentionally split into separate PRs.

flobernd and others added 2 commits July 29, 2026 17:07
do_batch_set recorded no per-key results and aborted the tile at the
first failure; completions moved per_key_results only for EXISTS, GET,
and DELETE. Partial store failures were therefore invisible to Python:
a batch either looked fully successful or carried a bare ok=false with
no way to tell which keys made it to storage.

Record a per-key result for every key in a SET tile (continuing past
failures), include SET in the completion's per-key result move, and
pre-allocate the result vector in submit_batch_set. Batch-level
ok=false semantics are preserved by rethrowing after recording, so
consumers that ignore per-key results see no behavior change. The
Mooncake connector already receives per-key results from
batch_put_from and now records them before failing the tile.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@voipmonitor, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9900e996-8278-4fe9-aa2e-f85c0e78affd

📥 Commits

Reviewing files that changed from the base of the PR and between 9cebd40 and baf1345.

📒 Files selected for processing (3)
  • csrc/storage_backends/connector_base.h
  • csrc/storage_backends/mooncake/connector.cpp
  • tests/v1/distributed/test_native_fs_connector_results.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@voipmonitor

Copy link
Copy Markdown
Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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