You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/02/10 19:57:51 UTC

[GitHub] [kafka] mumrah commented on a change in pull request #11603: MINOR: MetadataShell should handle ProducerIdsRecord

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



##########
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:
       I agree we should avoid considering the block size here. From a metadata log perspective, the only way to know the block size is to replay the records. However, when handling a snapshot, you lose the ability to see what the block sizes were since everything has been collapsed into a single ProducerIdsRecord.
   
   We should expose this as a single value like "nextProducerIdBlockStart" or something. 




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