Project sidecar writer registry#1058
Conversation
|
@codex review |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthrough
ChangesWriter registry projection
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Sidecar
participant EncryptionAdminServer
participant WriterRegistryStore
Sidecar->>EncryptionAdminServer: GetSidecarState または ResyncSidecar を呼び出す
EncryptionAdminServer->>WriterRegistryStore: DEK と caller node ID で registry 行を取得する
WriterRegistryStore-->>EncryptionAdminServer: registry 行を返す
EncryptionAdminServer-->>Sidecar: WriterRegistryForCaller を返す
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements the remaining Stage 7 §5.5 recovery surface for WriterRegistryForCaller by wiring the WriterRegistryStore into EncryptionAdminServer. Both GetSidecarState and ResyncSidecar now project the writer registry for the caller, returning the decoded LastSeenLocalEpoch for each DEK present in the sidecar. The review feedback correctly points out that returning codes.InvalidArgument when fullNodeID == 0 is misleading for GetSidecarState since it uses the local node's ID, and recommends returning codes.FailedPrecondition or codes.Internal instead.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Addressed latest-head review finding:
Caller audit:
Validation:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c8c99a0a8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| enableMutators, | ||
| rt.engine, | ||
| encryptionCapabilityFanout, | ||
| adapter.WithEncryptionAdminWriterRegistry(rt.writerRegistry), |
There was a problem hiding this comment.
Wire sidecar projection to the default registry
When a node runs multiple shard groups, this passes each per-shard admin listener its own Pebble registry, but the rest of the encryption path treats the default group store as the authoritative registry: process-start/runtime registration read store.WriterRegistryFor(defaultGroup.Store), and the startup guard documents that only the default group's FSM carries encryption entries. Calling GetSidecarState/ResyncSidecar on a non-default shard endpoint will therefore project from an empty or stale registry and silently omit writer_registry_for_caller rows, which defeats the monotonic-epoch recovery data this change is adding. Please share the default-group registry with all EncryptionAdmin servers or route these RPCs to that group.
Useful? React with 👍 / 👎.
|
Addressed latest-head P2 review finding:
Validation:
|
|
Current head is green and the latest sidecar projection findings have been addressed with tests. @codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Current head already handles the remaining sidecar projection thread:
Verification:
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
WriterRegistryForCallerfrom the writer registry inGetSidecarStateandResyncSidecarEncryptionAdminserverValidation
git diff --checkgo test ./adapter -run 'TestEncryptionAdmin_(GetSidecarState|ResyncSidecar)' -count=1 -timeout=240sgo test ./adapter -run TestEncryptionAdmin -count=1 -timeout=300sgo test ./cmd/elastickv-admin -run 'TestEncryption(Status|Endpoint|Sidecar)' -count=1 -timeout=180sgo test ./store ./internal/encryption . -count=1 -timeout=180sgolangci-lint run ./adapter ./store ./internal/encryption . --timeout=5mAuthor: bootjp
Summary by CodeRabbit
新機能
ドキュメント