Fix rocksmq retention panic when delete by message size (#7393)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
yukun 2021-09-01 12:03:58 +08:00 committed by GitHub
parent 1002815e00
commit 71aa300499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -377,7 +377,7 @@ func (ri *retentionInfo) expiredCleanUp(topic string) error {
if pageInfo != nil {
// Judge expire by ackedSize
if msgSizeExpiredCheck(deletedAckedSize, ackedInfo.ackedSize) {
for _, pEndID := range pageInfo.pageEndID[pageRetentionOffset:0] {
for _, pEndID := range pageInfo.pageEndID[pageRetentionOffset:] {
curDeletedSize := deletedAckedSize + pageInfo.pageMsgSize[pEndID]
if msgSizeExpiredCheck(curDeletedSize, ackedInfo.ackedSize) {
endID = pEndID