Skip to content

Commit

Permalink
fix: [cp24]l0RowCount metrics value always empty
Browse files Browse the repository at this point in the history
See also: milvus-io#36953
pr: milvus-io#37306

Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed Nov 4, 2024
1 parent 8ba0a4a commit a10b7c1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/datacoord/segment_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,9 +508,10 @@ func (s *SegmentInfo) getSegmentSize() int64 {
return s.size.Load()
}

// getDeltaCount use cached value when segment is immutable
// L1 segment deltaCount changes in any state
// L0 segment deltaCount won't change
func (s *SegmentInfo) getDeltaCount() int64 {
if s.deltaRowcount.Load() < 0 || s.State != commonpb.SegmentState_Flushed {
if s.deltaRowcount.Load() <= 0 || s.GetLevel() != datapb.SegmentLevel_L0 {
var rc int64
for _, deltaLogs := range s.GetDeltalogs() {
for _, l := range deltaLogs.GetBinlogs() {
Expand Down

0 comments on commit a10b7c1

Please sign in to comment.