niket-goel commented on a change in pull request #10899:
URL: https://github.com/apache/kafka/pull/10899#discussion_r655547991



##########
File path: 
raft/src/main/java/org/apache/kafka/raft/internals/BatchAccumulator.java
##########
@@ -233,6 +235,68 @@ public void appendLeaderChangeMessage(LeaderChangeMessage 
leaderChangeMessage, l
         }
     }
 
+
+    public void appendSnapshotHeaderMessage(MetadataSnapshotHeaderRecord 
snapshotHeaderRecord) {
+        appendLock.lock();
+        try {
+            // Ideally there should be nothing in the batch here.
+            // TODO verify this

Review comment:
       Hmmm. I see your point of not encoding the logic of maintaining the 
snapshot invariants into the BatchAccumulator, but then there is nothing in 
code preventing the usage pattern you listed above. Are we ok with that?




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


Reply via email to