[skip ci]Add comments for rocksmq Consume (#10118)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
This commit is contained in:
yukun 2021-10-18 19:48:40 +08:00 committed by GitHub
parent 2a0b731797
commit 8dccd0ca70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -572,6 +572,10 @@ func (rmq *rocksmq) updatePageInfo(topicName string, msgIDs []UniqueID, msgSizes
return nil
}
// Consume steps:
// 1. Consume n messages from rocksdb
// 2. Update current_id to the last consumed message
// 3. Update ack informations in rocksdb
func (rmq *rocksmq) Consume(topicName string, groupName string, n int) ([]ConsumerMessage, error) {
ll, ok := topicMu.Load(topicName)
if !ok {