fix: querynode num entity metric is broken by illegal label (#29948)

issue: #29766
also see pr: #29825

Signed-off-by: chyezh <ye.zhen@zilliz.com>
pull/29665/head
chyezh 2024-01-14 10:23:00 +08:00 committed by GitHub
parent 595ec2559c
commit d300bc7bcb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -126,7 +126,7 @@ func (sd *shardDelegator) ProcessInsert(insertRecords map[int64]*InsertData) {
fmt.Sprint(growing.Collection()), fmt.Sprint(growing.Collection()),
fmt.Sprint(growing.Partition()), fmt.Sprint(growing.Partition()),
growing.Type().String(), growing.Type().String(),
fmt.Sprint(0), "0",
).Add(float64(len(insertData.RowIDs))) ).Add(float64(len(insertData.RowIDs)))
growing.UpdateBloomFilter(insertData.PrimaryKeys) growing.UpdateBloomFilter(insertData.PrimaryKeys)

View File

@ -29,6 +29,7 @@ import (
"context" "context"
"fmt" "fmt"
"io" "io"
"strconv"
"sync" "sync"
"unsafe" "unsafe"
@ -1194,7 +1195,7 @@ func (s *LocalSegment) Release() {
fmt.Sprint(s.Collection()), fmt.Sprint(s.Collection()),
fmt.Sprint(s.Partition()), fmt.Sprint(s.Partition()),
s.Type().String(), s.Type().String(),
fmt.Sprint(len(s.Indexes())), strconv.FormatInt(int64(len(s.Indexes())), 10),
).Sub(float64(s.InsertCount())) ).Sub(float64(s.InsertCount()))
log.Info("delete segment from memory", log.Info("delete segment from memory",

View File

@ -1007,7 +1007,7 @@ func (loader *segmentLoader) loadSegment(ctx context.Context,
fmt.Sprint(segment.Collection()), fmt.Sprint(segment.Collection()),
fmt.Sprint(segment.Partition()), fmt.Sprint(segment.Partition()),
segment.Type().String(), segment.Type().String(),
fmt.Sprint(segment.Indexes()), strconv.FormatInt(int64(len(segment.Indexes())), 10),
).Add(float64(loadInfo.GetNumOfRows())) ).Add(float64(loadInfo.GetNumOfRows()))
log.Info("loading delta...") log.Info("loading delta...")