Repository navigation
Conversation
Signed-off-by: bootjp <contact@bootjp.me>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
TLA+ spec divergence review (auto-triggered)This PR touches files that the TLA+ safety spec has an anchor on (per Anchored files changed in this PR head (c7ecc43):
What to check, by subsystem:
If the change is correct but requires a spec update, edit @claude review please verify TLA+ spec divergence per the checklist above. @codex review please verify TLA+ spec divergence per the checklist above. |
Signed-off-by: bootjp <contact@bootjp.me>
TLA+ spec divergence review (auto-triggered)This PR touches files that the TLA+ safety spec has an anchor on (per Anchored files changed in this PR head (db43505):
What to check, by subsystem:
If the change is correct but requires a spec update, edit @claude review please verify TLA+ spec divergence per the checklist above. @codex review please verify TLA+ spec divergence per the checklist above. |
Signed-off-by: bootjp <contact@bootjp.me>
TLA+ spec divergence review (auto-triggered)This PR touches files that the TLA+ safety spec has an anchor on (per Anchored files changed in this PR head (14769ad):
What to check, by subsystem:
If the change is correct but requires a spec update, edit @claude review please verify TLA+ spec divergence per the checklist above. @codex review please verify TLA+ spec divergence per the checklist above. |
Signed-off-by: bootjp <contact@bootjp.me>
TLA+ spec divergence review (auto-triggered)This PR touches files that the TLA+ safety spec has an anchor on (per Anchored files changed in this PR head (b6b5a48):
What to check, by subsystem:
If the change is correct but requires a spec update, edit @claude review please verify TLA+ spec divergence per the checklist above. @codex review please verify TLA+ spec divergence per the checklist above. |
TLA+ spec divergence review (auto-triggered)This PR touches files that the TLA+ safety spec has an anchor on (per Anchored files changed in this PR head (cfd374d):
What to check, by subsystem:
If the change is correct but requires a spec update, edit @claude review please verify TLA+ spec divergence per the checklist above. @codex review please verify TLA+ spec divergence per the checklist above. |
Incident evidence
Two Redis-serving replicas reached their memory limits during a burst of
KEYSerrors.DELcompletion totals were flat across the interval. Those metrics record completed requests, so an individual command that died with the process cannot be identified from those counters alone.The adapter asked the store for up to
math.MaxIntkey/value rows before filtering internal records.KEYS,SCAN, andDBSIZEall used this path.SCAN COUNTlimited the response only.Change
SCAN. Each call can still traverse multiple pages. The change bounds the intermediate physical page, while logical result memory remains proportional to the number of matching keys.Validation
KEYS,SCAN COUNT, andDBSIZEwith hidden fences and binary keys, and verifies that a page boundary inside a physical namespace preserves keys on a different shard.adapter,kv, andstore. The main Jepsen harness passed 494 tests. The standalone Redis submodule could not loadjepsen.redison its classpath.RawKV receiver limit
The RawKV server validates
RawScanAtagainst a default maximum of 1,024 rows before opening a read snapshot.ELASTICKV_SCAN_PAGE_LIMIToverrides the receiver's limit. Excess requests returnInvalidArgumentwith the maximum the receiver accepts. Internal peer reads paginate and retry only this specific rejection, while preserving the route fence and read timestamp.The environment setting belongs at RawKV ingress. The Redis key enumeration fix still reads bounded storage pages. During a rolling upgrade from peers that can request 1,025 rows, the receiver can temporarily accept 1,025 until all peers support pagination.
The receiver checks one additional row in the same read snapshot to set optional
has_next. Responses stay within the requested limit. Peer pagination uses the flag when present and falls back to page length when an older server omits it.Pagination
The cursor rules below follow raw byte order for the requested direction.
start_keyis inclusive andend_keyis exclusive. Whenhas_nextistrue, use the last returned key to set the next page boundary.start_keyend_key0x00byte to the last returned keyend_keyreverse=true)start_keyStop when
has_nextisfalse. To scan a single snapshot, use the same nonzerotsstarting on the first request. A request withts=0selects a read timestamp for that request. Keep the scan direction and Raft routing parameters across pages.Pagination verification
Pebble scans now retain rows in raw user-key order before applying the page limit. The iterator and exact-key lookups share a snapshot and handle versions that interleave with extensions of the same key. This works with the existing on-disk encoding.
TestRawScanAtPebblePrefixPaginationreads overlapping binary keys over multiple pages in both directions with and without values. It verifies the full key sequence,has_next, exclusive end bounds, and visibility at a fixed timestamp. The fixture covers tombstones, expired values, and versions newer than the read timestamp. The test fails on the previous head and passes with this change.TestPebbleScanOrderMatchesMVCCWithBinaryBoundsalso compares Pebble with the in-memory store across limits, timestamps, and binary bounds. The existing RawKV receiver and peer pagination tests pass. The changed-line lint check forstoreandadapterreports zero issues.Pebble scan cost
Local Pebble microbenchmark medians at 1,024 rows per page, with 64-byte values, one CPU, and three samples per case.
At 64 rows, the forward value scan with prefix pairs increased from 19.0 to 21.1 µs. Allocated bytes per operation decreased in all measured cases. Prefix overlap can require extra iterator work to establish the page boundary.