chia7712 commented on code in PR #20660:
URL: https://github.com/apache/kafka/pull/20660#discussion_r2426537258
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogCleaner.java:
##########
@@ -484,7 +483,9 @@ public CleanerThread(int threadId) throws
NoSuchAlgorithmException {
config.dedupeBufferLoadFactor,
throttler,
time,
- this::checkDone
+ // Use a lambda instead of method reference to avoid
`this` escape
+ // The lambda captures `this` but doesn't evaluate it
until runtime
+ topicPartition -> checkDone(topicPartition)
Review Comment:
I don't think this change can eliminate the `this` reference.
--
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]