123123213weqw opened a new pull request, #10914:
URL: https://github.com/apache/rocketmq/pull/10914

   ## What is the purpose of the change
   
   Fix #10912.
   
   scanExpiredRecords() created two RocksDB Slice objects as iterator bounds 
and never closed them, leaking native memory on every POP revive scan. The 
slices are now created as named resources inside the try-with-resources block 
so they are closed together with the ReadOptions and iterator.
   
   ## Brief changelog
   
   - PopConsumerRocksdbStore.scanExpiredRecords(): move the two Slice bounds 
into try-with-resources
   
   ## How was this patch verified
   
   - Code review: RocksDB Slice implements AutoCloseable via 
AbstractNativeReference, so try-with-resources closes it deterministically
   - mvn -pl broker -am compile passes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to