-
Notifications
You must be signed in to change notification settings - Fork 334
refactor: refacts the seed peer selection logic from grpc resolver to… #4235
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
a092c3d
to
1743e7d
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4235 +/- ##
==========================================
- Coverage 32.91% 32.41% -0.51%
==========================================
Files 352 350 -2
Lines 41781 41630 -151
==========================================
- Hits 13754 13493 -261
- Misses 27137 27259 +122
+ Partials 890 878 -12
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
db1dddc
to
773b5ba
Compare
ffbb3c5
to
246e836
Compare
246e836
to
7079d0f
Compare
|
… self pick Signed-off-by: chlins <chlins.zhang@gmail.com>
7079d0f
to
4ac99eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request introduces significant changes to the seed peer management and preheating logic in the scheduler, primarily aimed at improving flexibility, simplifying the codebase, and enhancing the selection of seed peers. The most notable changes include replacing the centralized
SeedPeerClient
with a distributed client selection approach, introducing a hash ring for seed peer selection, and updating theHostManager
to distinguish between normal and non-normal hosts.Seed Peer Management Enhancements:
SeedPeerClient
with a distributed client selection mechanism, removing the centralized client implementation (scheduler/resource/standard/seed_peer_client.go
removed entirely).scheduler/resource/standard/seed_peer.go
).SeedPeer
interface to include aSelectSeedPeer
method, replacing the oldClient
method for selecting seed peers dynamically (scheduler/resource/standard/seed_peer.go
).Host Management Updates:
LoadAllNonNormals
toHostManager
to retrieve non-normal hosts (used to identify seed peers), and implemented this method inscheduler/resource/standard/host_manager.go
. [1] [2]HostManager
to support the newLoadAllNonNormals
method (scheduler/resource/standard/host_manager_mock.go
).Preheating Logic Improvements:
SelectSeedPeer
method for selecting seed peers dynamically, replacing the previous approach of relying on a static client (scheduler/job/job.go
). [1] [2] [3]preheatV1SingleSeedPeer
andpreheatV2SingleSeedPeerByURL
methods to create gRPC clients dynamically for the selected seed peer, with a note to reuse clients in the future if performance issues arise (scheduler/job/job.go
). [1] [2]Codebase Simplification:
SeedPeerClient
implementation and its associated methods, significantly simplifying the codebase (scheduler/resource/standard/seed_peer_client.go
removed entirely).Resource
initialization to directly create theSeedPeer
without the intermediateSeedPeerClient
(scheduler/resource/standard/resource.go
).These changes collectively improve the flexibility and maintainability of the seed peer management system, while also laying the groundwork for better scalability and performance in future iterations.… self pick
Description
Related Issue
#4217
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist