jsancio commented on code in PR #12414:
URL: https://github.com/apache/kafka/pull/12414#discussion_r937029349


##########
core/src/main/scala/kafka/server/metadata/BrokerMetadataListener.scala:
##########
@@ -129,16 +129,17 @@ class BrokerMetadataListener(
     }
   }
 
-  private def shouldSnapshot(): Option[String] = {
+  private def shouldSnapshot(): Option[SnapshotReason] = {
     val metadataVersionHasChanged: Boolean = metadataVersionChanged()
     val maxBytesHaveExceeded: Boolean = (_bytesSinceLastSnapshot >= 
maxBytesBetweenSnapshots)
 
+    //TODO: Figure out how to handle multiple reasons for snapshot

Review Comment:
   One solution is to return a `Set[SnapshotReason]` and pass the set when 
creating the snapshot.



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