Destroy readOptions after use

Signed-off-by: yukun <kun.yu@zilliz.com>
This commit is contained in:
yukun 2021-03-31 14:10:07 +08:00 committed by yefu.chen
parent 7bad0a01e9
commit 18e0581d5c

View File

@ -295,6 +295,7 @@ func (rmq *rocksmq) Consume(topicName string, groupName string, n int) ([]Consum
}
readOpts := gorocksdb.NewDefaultReadOptions()
defer readOpts.Destroy()
readOpts.SetPrefixSameAsStart(true)
iter := rmq.store.NewIterator(readOpts)
defer iter.Close()