jolshan commented on PR #15685: URL: https://github.com/apache/kafka/pull/15685#issuecomment-2076086916
I've cleaned up the code to not set the record in the storage tool when the version is 0. I also cleaned up the log since it is not always the case that the controller doesn't know the version. For now, 0 is a reasonable default. Here are the controller logs when i set the test version to 0 and to 1. ``` [2024-04-24 17:15:05,566] INFO [QuorumController id=1] Creating new QuorumController with clusterId F0eUpBlzS4yJYcsM9DNfXA. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:15:05,568] INFO [QuorumController id=1] Becoming the active controller at epoch 1, next write offset 1. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:15:05,570] WARN [QuorumController id=1] Performing controller activation. The metadata log appears to be empty. Appending 1 bootstrap record(s) in metadata transaction at metadata.version 3.7-IV4 from bootstrap source 'the binary bootstrap metadata file: /tmp/kraft-combined-logs/bootstrap.checkpoint'. Setting the ZK migration state to NONE since this is a de-novo KRaft cluster. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:15:05,571] INFO [QuorumController id=1] Replayed BeginTransactionRecord(name='Bootstrap records') at offset 1. (org.apache.kafka.controller.OffsetControlManager) [2024-04-24 17:15:05,571] INFO [QuorumController id=1] Replayed a FeatureLevelRecord setting metadata.version to 3.7-IV4 (org.apache.kafka.controller.FeatureControlManager) [2024-04-24 17:15:05,571] INFO [QuorumController id=1] Replayed EndTransactionRecord() at offset 4. (org.apache.kafka.controller.OffsetControlManager) [2024-04-24 17:15:05,645] INFO [QuorumController id=1] Replayed RegisterControllerRecord contaning ControllerRegistration(id=1, incarnationId=h3WYlEEtTUCG6nOjFnIQxQ, zkMigrationReady=false, listeners=[Endpoint(listenerName='CONTROLLER', securityProtocol=PLAINTEXT, host='10.200.4.27', port=9093)], supportedFeatures={metadata.version: 1-19, test.feature.version: 0-1}). (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:15:05,686] INFO [QuorumController id=1] Replayed initial RegisterBrokerRecord for broker 1: RegisterBrokerRecord(brokerId=1, isMigratingZkBroker=false, incarnationId=Ivj6roa7QnmcRbx_P_hg0A, brokerEpoch=6, endPoints=[BrokerEndpoint(name='PLAINTEXT', host='localhost', port=9092, securityProtocol=0)], features=[BrokerFeature(name='metadata.version', minSupportedVersion=1, maxSupportedVersion=19), BrokerFeature(name='test.feature.version', minSupportedVersion=0, maxSupportedVersion=1)], rack=null, fenced=true, inControlledShutdown=false, logDirs=[j6NFYHN2xQ8wG1rUVXf7LA]) (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:15:05,745] INFO [QuorumController id=1] Replayed RegisterBrokerRecord modifying the registration for broker 1: RegisterBrokerRecord(brokerId=1, isMigratingZkBroker=false, incarnationId=Ivj6roa7QnmcRbx_P_hg0A, brokerEpoch=7, endPoints=[BrokerEndpoint(name='PLAINTEXT', host='localhost', port=9092, securityProtocol=0)], features=[BrokerFeature(name='metadata.version', minSupportedVersion=1, maxSupportedVersion=19), BrokerFeature(name='test.feature.version', minSupportedVersion=0, maxSupportedVersion=1)], rack=null, fenced=true, inControlledShutdown=false, logDirs=[j6NFYHN2xQ8wG1rUVXf7LA]) (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:15:05,786] INFO [QuorumController id=1] The request from broker 1 to unfence has been granted because it has caught up with the offset of its register broker record 7. (org.apache.kafka.controller.BrokerHeartbeatManager) [2024-04-24 17:15:05,788] INFO [QuorumController id=1] Replayed BrokerRegistrationChangeRecord modifying the registration for broker 1: BrokerRegistrationChangeRecord(brokerId=1, brokerEpoch=7, fenced=-1, inControlledShutdown=0, logDirs=[]) (org.apache.kafka.controller.ClusterControlManager) ``` ``` 24-04-24 17:16:29,048] INFO [QuorumController id=1] Creating new QuorumController with clusterId F0eUpBlzS4yJYcsM9DNfXA. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:16:29,050] INFO [QuorumController id=1] Becoming the active controller at epoch 1, next write offset 1. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:16:29,051] WARN [QuorumController id=1] Performing controller activation. The metadata log appears to be empty. Appending 2 bootstrap record(s) in metadata transaction at metadata.version 3.7-IV4 from bootstrap source 'the binary bootstrap metadata file: /tmp/kraft-combined-logs/bootstrap.checkpoint'. Setting the ZK migration state to NONE since this is a de-novo KRaft cluster. (org.apache.kafka.controller.QuorumController) [2024-04-24 17:16:29,052] INFO [QuorumController id=1] Replayed BeginTransactionRecord(name='Bootstrap records') at offset 1. (org.apache.kafka.controller.OffsetControlManager) [2024-04-24 17:16:29,052] INFO [QuorumController id=1] Replayed a FeatureLevelRecord setting metadata.version to 3.7-IV4 (org.apache.kafka.controller.FeatureControlManager) [2024-04-24 17:16:29,052] INFO [QuorumController id=1] Replayed a FeatureLevelRecord setting feature test.feature.version to 1 (org.apache.kafka.controller.FeatureControlManager) [2024-04-24 17:16:29,053] INFO [QuorumController id=1] Replayed EndTransactionRecord() at offset 5. (org.apache.kafka.controller.OffsetControlManager) [2024-04-24 17:16:29,123] INFO [QuorumController id=1] Replayed RegisterControllerRecord contaning ControllerRegistration(id=1, incarnationId=K_kgrPTRRlKZDq56_5dA6w, zkMigrationReady=false, listeners=[Endpoint(listenerName='CONTROLLER', securityProtocol=PLAINTEXT, host='10.200.4.27', port=9093)], supportedFeatures={metadata.version: 1-19, test.feature.version: 0-1}). (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:16:29,169] INFO [QuorumController id=1] Replayed initial RegisterBrokerRecord for broker 1: RegisterBrokerRecord(brokerId=1, isMigratingZkBroker=false, incarnationId=yfPvBsa3QhqbDwIPuyvc3A, brokerEpoch=7, endPoints=[BrokerEndpoint(name='PLAINTEXT', host='localhost', port=9092, securityProtocol=0)], features=[BrokerFeature(name='metadata.version', minSupportedVersion=1, maxSupportedVersion=19), BrokerFeature(name='test.feature.version', minSupportedVersion=0, maxSupportedVersion=1)], rack=null, fenced=true, inControlledShutdown=false, logDirs=[hIbM7AYPZPeiH8k53crBMg]) (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:16:29,214] INFO [QuorumController id=1] Replayed RegisterBrokerRecord modifying the registration for broker 1: RegisterBrokerRecord(brokerId=1, isMigratingZkBroker=false, incarnationId=yfPvBsa3QhqbDwIPuyvc3A, brokerEpoch=8, endPoints=[BrokerEndpoint(name='PLAINTEXT', host='localhost', port=9092, securityProtocol=0)], features=[BrokerFeature(name='metadata.version', minSupportedVersion=1, maxSupportedVersion=19), BrokerFeature(name='test.feature.version', minSupportedVersion=0, maxSupportedVersion=1)], rack=null, fenced=true, inControlledShutdown=false, logDirs=[hIbM7AYPZPeiH8k53crBMg]) (org.apache.kafka.controller.ClusterControlManager) [2024-04-24 17:16:29,256] INFO [QuorumController id=1] The request from broker 1 to unfence has been granted because it has caught up with the offset of its register broker record 8. (org.apache.kafka.controller.BrokerHeartbeatManager) [2024-04-24 17:16:29,259] INFO [QuorumController id=1] Replayed BrokerRegistrationChangeRecord modifying the registration for broker 1: BrokerRegistrationChangeRecord(brokerId=1, brokerEpoch=8, fenced=-1, inControlledShutdown=0, logDirs=[]) (org.apache.kafka.controller.ClusterControlManager) ``` -- 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