mumrah commented on code in PR #17656:
URL: https://github.com/apache/kafka/pull/17656#discussion_r1824884317


##########
share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java:
##########
@@ -539,7 +539,7 @@ public void onNewMetadataImage(MetadataImage newImage, 
MetadataDelta delta) {
     }
 
     private TopicPartition topicPartitionFor(SharePartitionKey key) {

Review Comment:
   Can we add a unit test for this method?



##########
share-coordinator/src/main/java/org/apache/kafka/coordinator/share/ShareCoordinatorService.java:
##########
@@ -539,7 +539,7 @@ public void onNewMetadataImage(MetadataImage newImage, 
MetadataDelta delta) {
     }
 
     private TopicPartition topicPartitionFor(SharePartitionKey key) {
-        return new TopicPartition(Topic.SHARE_GROUP_STATE_TOPIC_NAME, 
partitionFor(key.toString()));
+        return new TopicPartition(Topic.SHARE_GROUP_STATE_TOPIC_NAME, 
partitionFor(key.asCoordinatorKey()));

Review Comment:
   @AndrewJSchofield could we move away from using String keys to avoid issues 
like this in the future? IOW, could we refactor `partitionFor` to accept a 
SharePartitionKey?



-- 
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]

Reply via email to