mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
this leads to the EntitiesNum metric would be never reduced fix: #29766 pr: #29870 Signed-off-by: yah01 <yang.cen@zilliz.com>
This commit is contained in:
parent
f0db26107c
commit
4edcd4d22b
@ -233,10 +233,6 @@ func (s *LocalSegment) InsertCount() int64 {
|
||||
s.ptrLock.RLock()
|
||||
defer s.ptrLock.RUnlock()
|
||||
|
||||
if !s.isValid() {
|
||||
return 0
|
||||
}
|
||||
|
||||
return s.insertCount.Load()
|
||||
}
|
||||
|
||||
@ -987,5 +983,6 @@ func (s *LocalSegment) Release() {
|
||||
zap.Int64("partitionID", s.partitionID),
|
||||
zap.Int64("segmentID", s.ID()),
|
||||
zap.String("segmentType", s.typ.String()),
|
||||
zap.Int64("insertCount", s.InsertCount()),
|
||||
)
|
||||
}
|
||||
|
||||
@ -184,13 +184,14 @@ func (suite *SegmentSuite) TestLoadDupIndex() {
|
||||
func (suite *SegmentSuite) TestSegmentReleased() {
|
||||
suite.sealed.Release()
|
||||
|
||||
suite.sealed.ptrLock.RLock()
|
||||
suite.False(suite.sealed.isValid())
|
||||
suite.sealed.ptrLock.RUnlock()
|
||||
suite.EqualValues(0, suite.sealed.InsertCount())
|
||||
suite.EqualValues(0, suite.sealed.RowNum())
|
||||
suite.EqualValues(0, suite.sealed.MemSize())
|
||||
suite.False(suite.sealed.HasRawData(101))
|
||||
sealed := suite.sealed
|
||||
|
||||
sealed.ptrLock.RLock()
|
||||
suite.False(sealed.isValid())
|
||||
sealed.ptrLock.RUnlock()
|
||||
suite.EqualValues(0, sealed.RowNum())
|
||||
suite.EqualValues(0, sealed.MemSize())
|
||||
suite.False(sealed.HasRawData(101))
|
||||
}
|
||||
|
||||
func TestSegment(t *testing.T) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user