Repository navigation
fix: reject incomplete cluster value pages - #279
Open
perfloop[bot] wants to merge 2 commits into
Open
perfloop[bot] wants to merge 2 commits into
perfloop[bot] wants to merge 2 commits into
Conversation
Signed-off-by: Perfloop Agent <agent@perfloop.ai>
Signed-off-by: Perfloop Agent <agent@perfloop.ai>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cluster-wide
ListWithValuescould return a terminal page (has_more=false) after an active shard could not be queried. Because callers usehas_moreto decide whether to request another page, they could stop before seeing keys held by that shard.Change
Value pages now return an error instead of merging a partial response when client acquisition or a shard's local value-list operation fails. Cancellation and the no-active-node error are unchanged. Keys-only
Listretains its existing best-effort behavior.Tests
The assertion is violated on the comparison and satisfied with this change:
For a cluster-wide public CacheService.ListWithValues request with two active shards holding distinct matching keys and a live caller context, a page is returned only if every active shard responds: a peer client-acquisition or ListLocalWithValues RPC failure returns an error and no response; healthy shards return both sorted values in a terminal page, caller cancellation remains context.Canceled, and zero active shards retains the existing error.Checks: 5 passed.
make test-server, includingTestCacheService_ListWithValuesRequiresEveryActiveShardmake test-race TEST=TestCacheService_ListWithValuesRequiresEveryActiveShardmake test-coverage TEST=TestCacheService_ListWithValuesRequiresEveryActiveShardmake build,make lint, andmake license-checkTarget CI retains the full
Test / buildrace and coverage runs, integration and end-to-end suites,Benchmark Cluster 3-Node / benchmark-cluster-3n,Benchmark Single Node / benchmark-single,DCO / dco, andLint PR Title / lint.Generated by Perfloop. Measurements and checks. Reproduce this comparison (tenant access required).
Note
Medium Risk
Changes cluster list semantics for value pages (stricter errors vs partial success) while keys-only list stays best-effort; incorrect rollout could surface more failures to callers that previously got incomplete pages.
Overview
Cluster-wide
ListWithValuesno longer returns a “complete” page when an active shard cannot be queried.fetchFromAllNodesnow fails the whole value-list fan-out if any node’s client lookup orListLocalWithValuesRPC errors, instead of skipping that shard and merging a partial result that could showhas_more=falsewhile keys on the failed shard were never seen.Keys-only cluster
Listbehavior is unchanged: per-node failures are still logged and skipped. Context cancellation and the existing no active nodes error are unchanged.Adds
TestCacheService_ListWithValuesRequiresEveryActiveShard, a multi-node integration test covering healthy merged pages, peer RPC/client failures, all-shard failure, cancellation, and zero active nodes.Reviewed by Cursor Bugbot for commit 7f1a524. Bugbot is set up for automated code reviews on this repo. Configure here.