Fix rocksmq produce hang when do search repeatedly (#12225)

Signed-off-by: fishpenguin <kun.yu@zilliz.com>
pull/12231/head
yukun 2021-11-23 19:15:22 +08:00 committed by GitHub
parent 8e0c8febe9
commit 6a167f8579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -597,6 +597,9 @@ func (rmq *rocksmq) Consume(topicName string, groupName string, n int) ([]Consum
log.Debug("RocksMQ: load " + metaKey + " failed")
return nil, err
}
if currentID == "" {
return nil, fmt.Errorf("currentID of topicName=%s, groupName=%s not exist", topicName, groupName)
}
readOpts := gorocksdb.NewDefaultReadOptions()
defer readOpts.Destroy()