Re: [PR] KAFKA-15875 Make Snapshot public [kafka]
github-actions[bot] commented on PR #14816: URL: https://github.com/apache/kafka/pull/14816#issuecomment-2058166826 This PR is being marked as stale since it has not had any activity in 90 days. If you would like to keep this PR alive, please ask a committer for review. If the PR has merge conflicts, please update it with the latest from trunk (or appropriate release branch) If this PR is no longer valid or desired, please feel free to close it. If no activity occurs in the next 30 days, it will be automatically closed. -- 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
Re: [PR] KAFKA-15875 Make Snapshot public [kafka]
jlprat commented on PR #14816: URL: https://github.com/apache/kafka/pull/14816#issuecomment-1893695843 Any thoughts on this @cmccabe ? -- 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
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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] KAFKA-15875 Make Snapshot public [kafka]
jlprat commented on PR #14816: URL: https://github.com/apache/kafka/pull/14816#issuecomment-1829650882 Hi @cmccabe Since you were the one creating these classes, would you have some spare time to review this PR? Thanks! -- 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
Re: [PR] KAFKA-15875 Make Snapshot public [kafka]
jlprat commented on code in PR #14816: URL: https://github.com/apache/kafka/pull/14816#discussion_r1401847506 ## server-common/src/main/java/org/apache/kafka/timeline/Snapshot.java: ## @@ -24,10 +24,10 @@ * A snapshot of some timeline data structures. * * The snapshot contains historical data for several timeline data structures. - * We use an IdentityHashMap to store this data. This way, we can easily drop all of + * We use an IdentityHashMap to store this data. This way, we can easily drop all * the snapshot data. */ -class Snapshot { +public class Snapshot { Review Comment: Class is now public, but only read methods are public, so no class from outside the package can tamper with the data in this data structure -- 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
[PR] KAFKA-15875 Make Snapshot public [kafka]
jlprat opened a new pull request, #14816: URL: https://github.com/apache/kafka/pull/14816 Makes Snapshop, Revertable and Delta classes public. Only read methods are made public as well. Snapshot, Revertable and Delta are package protected but they potentially leak to classes in other packages (org.apache.kafka.controller.OffsetControlManager). *More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.* *Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.* ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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