rondagostino commented on a change in pull request #10069: URL: https://github.com/apache/kafka/pull/10069#discussion_r573201310
########## File path: core/src/main/scala/kafka/server/metadata/MetadataPartitions.scala ########## @@ -39,11 +41,30 @@ object MetadataPartition { record.isr(), Collections.emptyList(), // TODO KAFKA-12285 handle offline replicas Collections.emptyList(), - Collections.emptyList()) + Collections.emptyList(), + largestDeferredOffsetEverSeen = deferredAtOffset.getOrElse(OffsetNeverDeferred), + isCurrentlyDeferringChanges = deferredAtOffset.isDefined) Review comment: As discussed offline, we will eliminate the information from the messages we log when applying deferred changes, and we won't carry that info around in `MetadataPartition`. Currently `RaftReplicaManager` knows if it is deferring changes or not. Maybe later when we get `BrokerLifecycleManager` and `BrokerMetadataListener` committed we can think about where a global boolean might live to identify if the broker is fenced or not. It isn't critical to decide right now because we are only going to defer the application of partition metadata at startup in 2.8. ########## File path: core/src/main/scala/kafka/server/metadata/MetadataPartitions.scala ########## @@ -30,7 +31,8 @@ import scala.jdk.CollectionConverters._ object MetadataPartition { - def apply(name: String, record: PartitionRecord): MetadataPartition = { + val OffsetNeverDeferred = 0L // must not be a valid offset we could see (i.e. must not be positive) Review comment: As discussed offline, we will remove this and not include the last seen offset in log messages when applying deferred changes. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org