Re: [PR] KAFKA-16754: Removing partitions from release API (KIP-932) [kafka]
omkreddy merged PR #16513: URL: https://github.com/apache/kafka/pull/16513 -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
apoorvmittal10 commented on PR #16513: URL: https://github.com/apache/kafka/pull/16513#issuecomment-2206307430 @AndrewJSchofield @omkreddy The build passed with unrelated tests failure. -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
apoorvmittal10 commented on code in PR #16513: URL: https://github.com/apache/kafka/pull/16513#discussion_r1663843416 ## server/src/main/java/org/apache/kafka/server/share/ShareSessionCache.java: ## @@ -41,10 +41,10 @@ public class ShareSessionCache { private long numPartitions = 0; // A map of session key to ShareSession. -private Map sessions = new HashMap<>(); +private final Map sessions = new HashMap<>(); // Maps last used times to sessions. -private TreeMap lastUsed = new TreeMap<>(); +private final TreeMap lastUsed = new TreeMap<>(); // Visible for testing public synchronized TreeMap lastUsed() { Review Comment: Yeah, that's true this is bit odd and I have removed the method from the class itself. I don't see any usage of this method yet and if required by tests in future then we should send a copy of tree map instead the map itself. -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
apoorvmittal10 commented on code in PR #16513: URL: https://github.com/apache/kafka/pull/16513#discussion_r1663835968 ## core/src/test/java/kafka/server/share/SharePartitionManagerTest.java: ## @@ -1246,26 +1250,40 @@ public void testCloseSharePartitionManager() throws Exception { @Test public void testReleaseAcquiredRecordsSuccess() { String groupId = "grp"; -String memberId = Uuid.randomUuid().toString(); +Uuid memberId = Uuid.randomUuid(); Review Comment: Yeah, a conversion from string to Uuid was required later so don't see any point in converting to string first then back to Uuid from string. -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
AndrewJSchofield commented on code in PR #16513: URL: https://github.com/apache/kafka/pull/16513#discussion_r1663821656 ## server/src/main/java/org/apache/kafka/server/share/ShareSessionCache.java: ## @@ -41,10 +41,10 @@ public class ShareSessionCache { private long numPartitions = 0; // A map of session key to ShareSession. -private Map sessions = new HashMap<>(); +private final Map sessions = new HashMap<>(); // Maps last used times to sessions. -private TreeMap lastUsed = new TreeMap<>(); +private final TreeMap lastUsed = new TreeMap<>(); // Visible for testing public synchronized TreeMap lastUsed() { Review Comment: This seems a bit odd. This method exposes the TreeMap for testing, which breaks encapsulation and surely risks synchronization problems if used for anything other than testing. So, is there any point in the method being declared synchronized? Accessing the TreeMap in the caller is not going to be synchronized. -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
adixitconfluent commented on code in PR #16513: URL: https://github.com/apache/kafka/pull/16513#discussion_r1663802402 ## core/src/test/java/kafka/server/share/SharePartitionManagerTest.java: ## @@ -1246,26 +1250,40 @@ public void testCloseSharePartitionManager() throws Exception { @Test public void testReleaseAcquiredRecordsSuccess() { String groupId = "grp"; -String memberId = Uuid.randomUuid().toString(); +Uuid memberId = Uuid.randomUuid(); Review Comment: Any particular reason toString method is removed here and then used at multiple places within the test wherever memberId is being used? -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
apoorvmittal10 commented on PR #16513: URL: https://github.com/apache/kafka/pull/16513#issuecomment-2205430052 The context: https://github.com/apache/kafka/pull/16456/files#r1662556294 -- 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-16754: Removing partitions from release API (KIP-932) [kafka]
apoorvmittal10 opened a new pull request, #16513: URL: https://github.com/apache/kafka/pull/16513 The release API exposed Partitions which should be an internal implementation detail for `releaseAcquiredRecords` API. Also lessen the scope for cached topic partitons method as it's not needed. ### 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