[skip ci]Add retention comment (#11432)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/11433/head
yukun 2021-11-08 18:45:14 +08:00 committed by GitHub
parent e8fc0bedff
commit 3a65a4517c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ func (ri *retentionInfo) Stop() {
})
}
// expiredCleanUp check message retention by page:
// 1. check acked timestamp of each page id, if expired, the whole page is expired;
// 2. check acked size from the last unexpired page id;
// 3. delete acked info by range of page id;
// 4. delete message by range of page id;
func (ri *retentionInfo) newExpiredCleanUp(topic string) error {
log.Debug("Timeticker triggers an expiredCleanUp task for topic: " + topic)
var deletedAckedSize int64 = 0