From ce7bceece90505aff28b0814dda7eafa421fe704 Mon Sep 17 00:00:00 2001 From: congqixia Date: Fri, 21 Jun 2024 17:08:02 +0800 Subject: [PATCH] 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 --- internal/querynodev2/pkoracle/candidate.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/querynodev2/pkoracle/candidate.go b/internal/querynodev2/pkoracle/candidate.go index 65843bbb1a..5e50f7a6cc 100644 --- a/internal/querynodev2/pkoracle/candidate.go +++ b/internal/querynodev2/pkoracle/candidate.go @@ -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 } }