mirror of https://github.com/milvus-io/milvus.git
Delete messages before delete meta data in rocksmq retention (#9694)
Signed-off-by: fishpenguin <kun.yu@zilliz.com>pull/9743/head
parent
de14446286
commit
cdeb64d90a
|
@ -517,11 +517,17 @@ func (ri *retentionInfo) newExpiredCleanUp(topic string) error {
|
|||
|
||||
newAckedSize := totalAckedSize - deletedAckedSize
|
||||
writeBatch.Put([]byte(ackedSizeKey), []byte(strconv.FormatInt(newAckedSize, 10)))
|
||||
|
||||
err = DeleteMessages(ri.db, topic, startID, endID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
writeOpts := gorocksdb.NewDefaultWriteOptions()
|
||||
defer writeOpts.Destroy()
|
||||
ri.kv.DB.Write(writeOpts, writeBatch)
|
||||
|
||||
return DeleteMessages(ri.db, topic, startID, endID)
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue