jlprat commented on PR #14816:
URL: https://github.com/apache/kafka/pull/14816#issuecomment-1842584596

   @cmccabe 
https://github.com/apache/kafka/blob/83110e2d425b49fed8ad5fdc6e93579423c73289/metadata/src/main/java/org/apache/kafka/controller/OffsetControlManager.java#L158
 is where you can find a potential leak. The class calls `getOrCreateSnapshot` 
which returns a `Snapshot` but doesn't assign it to any value.
   We have 2 options:
   a) What's done on this PR, "open up" `Snapshot` to be public instead of 
package protected
   b) We create new methods in `SnapshotRegistry`, for example in this case we 
should create something like `public void idempotentCreateSnapshot(long epoch)`
   
   Let me know your thoughts


-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to