-
Notifications
You must be signed in to change notification settings - Fork 3.6k
fix: executor/scheduler should be latest replica meta but not replica copy #45877
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
base: master
Are you sure you want to change the base?
Conversation
… copy Signed-off-by: chyezh <[email protected]>
|
[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 |
|
[ci-v2-notice]
To rerun ci-v2 checks, comment with:
If you have any questions or requests, please contact @zhikunyao. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #45877 +/- ##
==========================================
+ Coverage 76.13% 76.18% +0.05%
==========================================
Files 1869 1881 +12
Lines 292340 294241 +1901
==========================================
+ Hits 222576 224171 +1595
- Misses 62378 62631 +253
- Partials 7386 7439 +53
🚀 New features to boost your workflow:
|
|
/ci-rerun-ut-go |
| log.Warn("node doesn't belong to any replica", zap.Error(err)) | ||
| return | ||
| } | ||
| view := ex.dist.ChannelDistManager.GetShardLeader(task.Shard(), replica) |
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.
do we need to verify replicaID is same as we execute?
| leader := scheduler.distMgr.ChannelDistManager.GetShardLeader(task.Shard(), task.replica) | ||
| leader := scheduler.getReplicaShardLeader(task.Shard(), task.ReplicaID()) | ||
| if leader == nil { | ||
| return merr.WrapErrServiceInternal("segment's delegator leader not found, stop balancing") |
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.
do we need to check the target node is still under the replica?
probably it's safe to lock and drain all the balance task before replica change? currently there seems to be many corner cases to handle?
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.
if we don't want replica mutual exclusive to balance, it might at least to check the replica exist and node belongs to replica at preProcess?
| // wait for new delegator becomes leader, then try to remove old leader | ||
| task := task.(*ChannelTask) | ||
| delegator := scheduler.distMgr.ChannelDistManager.GetShardLeader(task.Shard(), task.replica) | ||
| delegator := scheduler.getReplicaShardLeader(task.Shard(), task.ReplicaID()) |
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.
is there a possibility that the node does not belong to the replica anymore?
issue: #45865