dengziming commented on code in PR #12265:
URL: https://github.com/apache/kafka/pull/12265#discussion_r915532837


##########
core/src/main/scala/kafka/server/metadata/BrokerMetadataSnapshotter.scala:
##########
@@ -45,26 +45,37 @@ class BrokerMetadataSnapshotter(
    */
   private var _currentSnapshotOffset = -1L
 
+  /**
+   * The offset of the newest snapshot, or -1 if there hasn't been one. 
Accessed only under
+   * the object lock.
+   */
+  private var _latestSnapshotOffset = -1L

Review Comment:
   This seems an existing problem, I checked the logic of 
`QuorumController.SnapshotGeneratorManager`, it will check the result of 
`raftClient.createSnapshot` and just skip it if it's empty, however, at broker 
side, `BrokerSnapshotWriterBuilder` will throw an exception on empty snapshot. 
how about making it consistent with controller code.



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