enhance: remove repeated stats of loaded entity (#33255)

Signed-off-by: jaime <yun.zhang@zilliz.com>
pull/33388/head
jaime 2024-05-27 01:49:41 +08:00 committed by GitHub
parent e708974578
commit 58ee613fea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 19 deletions

View File

@ -30,7 +30,6 @@ import (
"fmt" "fmt"
"io" "io"
"runtime" "runtime"
"strconv"
"strings" "strings"
"unsafe" "unsafe"
@ -440,15 +439,6 @@ func (s *LocalSegment) initializeSegment() error {
// Update the insert count when initialize the segment and update the metrics. // Update the insert count when initialize the segment and update the metrics.
s.insertCount.Store(loadInfo.GetNumOfRows()) s.insertCount.Store(loadInfo.GetNumOfRows())
metrics.QueryNodeNumEntities.WithLabelValues(
s.DatabaseName(),
fmt.Sprint(paramtable.GetNodeID()),
fmt.Sprint(s.Collection()),
fmt.Sprint(s.Partition()),
s.Type().String(),
strconv.FormatInt(int64(len(s.Indexes())), 10),
).Add(float64(loadInfo.GetNumOfRows()))
return nil return nil
} }
@ -808,15 +798,6 @@ func (s *LocalSegment) Insert(ctx context.Context, rowIDs []int64, timestamps []
} }
s.insertCount.Add(int64(numOfRow)) s.insertCount.Add(int64(numOfRow))
metrics.QueryNodeNumEntities.WithLabelValues(
s.DatabaseName(),
fmt.Sprint(paramtable.GetNodeID()),
fmt.Sprint(s.Collection()),
fmt.Sprint(s.Partition()),
s.Type().String(),
strconv.FormatInt(int64(len(s.Indexes())), 10),
).Add(float64(numOfRow))
s.rowNum.Store(-1) s.rowNum.Store(-1)
s.memSize.Store(-1) s.memSize.Store(-1)
return nil return nil