You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "123123213weqw (via GitHub)" <gi...@apache.org> on 2026/08/12 16:05:14 UTC

[PR] [ISSUE #10912] Close RocksDB Slice objects in scanExpiredRecords [rocketmq]

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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org