ashmeet13 commented on code in PR #12414: URL: https://github.com/apache/kafka/pull/12414#discussion_r943240735
########## core/src/main/scala/kafka/server/metadata/BrokerMetadataSnapshotter.scala: ########## @@ -59,11 +60,19 @@ class BrokerMetadataSnapshotter( val writer = writerBuilder.build( image.highestOffsetAndEpoch().offset, image.highestOffsetAndEpoch().epoch, - lastContainedLogTime - ) + lastContainedLogTime) if (writer.nonEmpty) { _currentSnapshotOffset = image.highestOffsetAndEpoch().offset - info(s"Creating a new snapshot at offset ${_currentSnapshotOffset}...") + + var stringReasons: Set[String] = Set() + + snapshotReasons.foreach(r => stringReasons += r.toString) + + if (stringReasons.isEmpty){ + stringReasons += SnapshotReason.UnknownReason.toString + } + + info(s"Creating a new snapshot at offset ${_currentSnapshotOffset} because, ${stringReasons.mkString(" and ")}") Review Comment: Made this change -- 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