alanlau28 opened a new pull request, #23085: URL: https://github.com/apache/kafka/pull/23085
`org.rocksdb.RocksDB` allocates a `ReadOptions` in a field initializer and never closes it: `private final ReadOptions defaultReadOptions_ = new ReadOptions(); // RocksDB.java:42` Streams is unusually exposed: it opens one RocksDB per store *and per segment*, and `AbstractSegments.cleanupExpiredSegments()` closes expired segments during ordinary processing, so windowed and session stores churn segments continuously. The loss accumulates in steady state, not just at rebalances. ### The change `RocksDBStore` releases the field immediately after `db.close()`, at both close sites — `close()` and `closeDbAndAccessors()` (the `openDB` error-cleanup path, which leaks identically when an open fails partway). 40 lines of production code. No public API, configuration, metric or wire-protocol change. -- 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]
