fix: [2.3] Check nodeID wildcard when removing pkOracle (#33895) (#34022)

Cherry-pick from master
pr: #33895
See also #33894

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-06-21 17:08:02 +08:00 committed by GitHub
parent 9157980232
commit ce7bceece9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,7 +52,8 @@ func WithSegmentType(typ commonpb.SegmentState) CandidateFilter {
// WithWorkerID returns CandidateFilter with provided worker id.
func WithWorkerID(workerID int64) CandidateFilter {
return func(candidate candidateWithWorker) bool {
return candidate.workerID == workerID
return candidate.workerID == workerID ||
workerID == -1 // wildcard for offline node
}
}