hachikuji commented on a change in pull request #11603:
URL: https://github.com/apache/kafka/pull/11603#discussion_r804018735



##########
File path: shell/src/main/java/org/apache/kafka/shell/MetadataNodeManager.java
##########
@@ -318,6 +320,16 @@ private void handleCommitImpl(MetadataRecordType type, 
ApiMessage message)
                     node.create(record.key()).setContents(record.value() + "");
                 break;
             }
+            case PRODUCER_IDS_RECORD: {
+                ProducerIdsRecord record = (ProducerIdsRecord) message;
+                DirectoryNode producerIdNode = 
data.root.mkdirs("lastProducerIdBlock");
+                
producerIdNode.create("assignedBrokerId").setContents(record.brokerId() + "");
+                
producerIdNode.create("assignedBrokerEpoch").setContents(record.brokerEpoch() + 
"");
+                producerIdNode.create("blockStart")

Review comment:
       @dengziming I was looking at 
[KIP-730](https://cwiki.apache.org/confluence/display/KAFKA/KIP-730%3A+Producer+ID+generation+in+KRaft+mode).
 It is true that we currently hard-code the block length, but the 
`AllocateProducerIds` response reserves some flexibility for a dynamic block 
length (i.e. the block length is returned in the response). I wonder if it 
would be better not to depend on the hard-coded block size. Maybe we could make 
this `/producerIds/nextBlockStartId` or something like that.
   
   @mumrah What do you think?




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