-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
optimize: enable immediate EC shard reporting during startup #7933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ported the immediate EC shard reporting feature from Enterprise to Community version. This allows the master to be notified about EC shards immediately during volume server startup, instead of waiting for the first heartbeat. Changes: 1. Updated NewStore to initialize notification channels BEFORE loading volumes (fixes potential nil panic). 2. Added ecShardNotifyHandler to report EC shards to NewEcShardsChan during startup. 3. Implemented non-blocking channel send for EC reporting to prevent deadlock when loading many EC shards (fixing the enterprise bug 17ac129). 4. Updated DiskLocation and EC loading logic to support the callback. This optimization improves cluster state consistency and startup speed for EC-heavy clusters.
|
Caution Review failedThe pull request is closed. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughWalkthroughAdds a per-shard callback into EC shard loading: DiskLocation gains an Changes
Sequence DiagramsequenceDiagram
participant Store
participant DiskLocation
participant ECLoader as EC Loader
participant Handler as Notify Handler
participant Chan as NewEcShardsChan
Store->>Store: create channels (NewEcShardsChan, DeletedEcShardsChan, ...)
Store->>DiskLocation: set ecShardNotifyHandler(handler)
Store->>DiskLocation: loadAllEcShardsWithCallback(onShardLoad)
loop per EC shard
DiskLocation->>ECLoader: load shard files / validate
ECLoader->>Handler: onShardLoad(collection, vid, shardId, ecVolume)
rect rgba(90,170,120,0.08)
Note over Handler,Chan: handler enqueues startup notification
alt channel has capacity
Handler->>Chan: non-blocking send VolumeEcShardInformationMessage
else channel full
Handler->>Handler: log "startup channel full" (defer to heartbeat)
end
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
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 |
Summary of ChangesHello @chrislusf, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request optimizes the startup process of the volume server by enabling immediate reporting of erasure coded (EC) shards. Previously, EC shards would only be reported to the master during subsequent heartbeat cycles, leading to a delay in the master's awareness of available shards. By introducing a callback mechanism during shard loading and ensuring channels are initialized earlier, the system can now report newly loaded EC shards as soon as they are discovered, improving system responsiveness and consistency from the moment a volume server starts. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
This PR enables immediate EC shard reporting during volume server startup,
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.