-
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
fix: Delegator may becomes unserviceable after querycoord restart #37055
fix: Delegator may becomes unserviceable after querycoord restart #37055
Conversation
after querycoord restart, segment_checker may release segment by mistake due to next target isn't ready yet. This PR requires release segment must happens after next target is ready. Signed-off-by: Wei Liu <wei.liu@zilliz.com>
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.
this PR may cause segment checker unable to release segment if current/next target is the same
@@ -192,13 +192,14 @@ func (c *SegmentChecker) getGrowingSegmentDiff(collectionID int64, | |||
continue | |||
} | |||
|
|||
nextTargetExist := c.targetMgr.IsNextTargetExist(collectionID) |
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.
- why don't we just skip this round if nextTarget not Exist?
- targetVersion := c.targetMgr.GetCollectionTargetVersion(collectionID, meta.CurrentTarget)
if view.TargetVersion != targetVersion {
// before shard delegator update it's readable version, skip release segment
log.RatedInfo(20, "before shard delegator update it's readable version, skip release segment",
zap.String("channelName", channelName),
zap.Int64("nodeID", node),
zap.Int64("leaderVersion", view.TargetVersion),
zap.Int64("currentVersion", targetVersion),
)
continue
}
can we handle by this logic above but not introduce another nextTargetExist check?
the code itself is very redundant
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.
- we can't use same condition to skip this round, cause load segment just require next target exist, but release segment require both current target and next target exists.
- target version can't block releasing segment in next target, cause it only works for current target
target_observer will update current target first, then update next target. so current target and next target will both survive even if they have same content. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: weiliu1031, xiaofan-luan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…lvus-io#37055) issue: milvus-io#37054 after querycoord restart, segment_checker may release segment by mistake due to next target isn't ready yet. This PR requires release segment must happens after next target is ready. Signed-off-by: Wei Liu <wei.liu@zilliz.com>
issue: #37054
after querycoord restart, segment_checker may release segment by mistake due to next target isn't ready yet.
This PR requires release segment must happens after next target is ready.