You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "jlprat (via GitHub)" <gi...@apache.org> on 2023/12/06 10:18:20 UTC
Re: [PR] KAFKA-15875 Make Snapshot public [kafka]
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-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org