Skip to content

Commit

Permalink
fix: Aviod add negative missing count (milvus-io#38748)
Browse files Browse the repository at this point in the history
See also: milvus-io#34665

Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn authored Dec 26, 2024
1 parent 94955e5 commit 4df444e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/datanode/compaction/compactor_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ func (filter *EntityFilter) GetDeltalogDeleteCount() int {
}

func (filter *EntityFilter) GetMissingDeleteCount() int {
return filter.GetDeltalogDeleteCount() - filter.GetDeletedCount()
diff := filter.GetDeltalogDeleteCount() - filter.GetDeletedCount()
if diff <= 0 {
diff = 0
}
return diff
}

func (filter *EntityFilter) isEntityDeleted(pk interface{}, pkTs typeutil.Timestamp) bool {
Expand Down

0 comments on commit 4df444e

Please sign in to comment.