Fix querynodev2 grace stop condition reversed (#25409)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2023-07-07 17:28:25 +08:00 committed by GitHub
parent 9b64f12a6c
commit f07c934558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -374,8 +374,8 @@ func (node *QueryNode) Stop() error {
timeoutCh := time.After(paramtable.Get().QueryNodeCfg.GracefulStopTimeout.GetAsDuration(time.Second))
outer:
for (node.manager == nil || node.manager.Segment.Empty()) &&
(node.pipelineManager == nil || node.pipelineManager.Num() == 0) {
for (node.manager != nil && !node.manager.Segment.Empty()) ||
(node.pipelineManager != nil && node.pipelineManager.Num() != 0) {
select {
case <-timeoutCh:
var (