fix: Aviod add negative missing count (#38748)

See also: #34665

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
pull/38798/head
XuanYang-cn 2024-12-26 18:58:56 +08:00 committed by GitHub
parent 94955e5292
commit 4df444ef25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -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 {