From 9d1f55020474fa4d54a891ff2406c08ea8da8b67 Mon Sep 17 00:00:00 2001 From: hlts2 Date: Mon, 9 Sep 2024 16:44:05 +0900 Subject: [PATCH] fix: disable kvs and vqueue initialization Signed-off-by: hlts2 --- pkg/agent/core/ngt/service/ngt.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/agent/core/ngt/service/ngt.go b/pkg/agent/core/ngt/service/ngt.go index 4c1ce19650..a0e5e93dc3 100644 --- a/pkg/agent/core/ngt/service/ngt.go +++ b/pkg/agent/core/ngt/service/ngt.go @@ -1242,8 +1242,8 @@ func (n *ngt) RegenerateIndexes(ctx context.Context) (err error) { if err != nil { log.Errorf("failed to flushing vector to ngt index in delete kvs. error: %v", err) } - n.kvs = nil - n.vq = nil + // n.kvs = nil + // n.vq = nil // gc runtime.GC() @@ -1265,20 +1265,20 @@ func (n *ngt) RegenerateIndexes(ctx context.Context) (err error) { } } - nkvs := kvs.New(kvs.WithConcurrency(n.kvsdbConcurrency)) - - nvq, err := vqueue.New() - if err != nil { - log.Errorf("failed to create new vector vector queue. error: %v", err) - } + // nkvs := kvs.New(kvs.WithConcurrency(n.kvsdbConcurrency)) + // + // nvq, err := vqueue.New() + // if err != nil { + // log.Errorf("failed to create new vector vector queue. error: %v", err) + // } // renew instance nn, err := newNGT(n.cfg, n.opts...) if err != nil { return err } - nn.kvs = nkvs - nn.vq = nvq + // nn.kvs = nkvs + // nn.vq = nvq // Regenerate with flags set nn.flushing.Store(true)