From d27ba65cf720930dc6e25d7a19126ecdd22388bd Mon Sep 17 00:00:00 2001 From: hlts2 Date: Mon, 9 Sep 2024 15:23:15 +0900 Subject: [PATCH] fix: add nil check Signed-off-by: hlts2 --- pkg/agent/core/ngt/service/ngt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index ee53a85bb7..b65f180b3f 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -908,7 +908,7 @@ func (n *ngt) Start(ctx context.Context) <-chan error { } return ctx.Err() case <-tick.C: - if n.vq.IVQLen() >= n.alen { + if n.vq != nil && !n.IsFlushing() && n.vq.IVQLen() >= n.alen { err = n.CreateIndex(ctx, n.poolSize) } case <-limit.C: