-
Notifications
You must be signed in to change notification settings - Fork 3k
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
enhance: implement balancer at streaming coord #34435
enhance: implement balancer at streaming coord #34435
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chyezh The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
11b809a
to
4032087
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #34435 +/- ##
==========================================
+ Coverage 84.36% 84.38% +0.02%
==========================================
Files 849 876 +27
Lines 114810 115881 +1071
==========================================
+ Hits 96857 97784 +927
- Misses 13679 13786 +107
- Partials 4274 4311 +37
|
@chyezh E2e jenkins job failed, comment |
- add balancer implementation - add channel count fair balance policy - add discover grpc service Signed-off-by: chyezh <[email protected]>
5cf73bd
to
68747de
Compare
// SavePChannels saves a pchannel | ||
func (c *catalog) SavePChannels(ctx context.Context, infos []*streamingpb.PChannelMeta) error { | ||
kvs := make(map[string]string, len(infos)) | ||
for _, info := range infos { |
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.
It is possible to exceed the maximum txn number of etcd, which requires executing multiple saves with multiple batches. you can refer to SaveByBatch method in datacoord catalog
} | ||
|
||
// PChannelMetaHistory is the history meta information of a pchannel, should only keep the data that is necessary to persistent. | ||
message PChannelMetaHistory { |
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.
suggest renaming PChannelMetaHistory to PChannelAssignmentLog
// Balancer should be thread safe. | ||
type Balancer interface { | ||
// WatchBalanceResult watches the balance result. | ||
WatchBalanceResult(ctx context.Context, cb func(version typeutil.VersionInt64Pair, relations []types.PChannelInfoAssigned) error) error |
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.
rename method name to WatchChannelAssignments?
/lgtm |
issue: #33285