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


##########
raft/src/main/java/org/apache/kafka/raft/KafkaRaftClient.java:
##########
@@ -3302,19 +3297,34 @@ private long append(int epoch, List<T> records, 
OptionalLong requiredBaseOffset,
 
         BatchAccumulator<T> accumulator = leaderState.accumulator();
         boolean isFirstAppend = accumulator.isEmpty();
-        final long offset = accumulator.append(epoch, records, 
requiredBaseOffset, isAtomic);
+        final long offset = accumulator.append(epoch, records, true);

Review Comment:
   The controller used to use both atomic and non-atomic append. That logic was 
changed to do the record splitting in the metadata module and only use atomic 
appends. This was required so that the in-memory snapshots generated by the 
controller were not split across batches.
   
   If the records in an in-memory snapshot were split across batch boundaries 
then the controller was not able to revert to an in-memory snapshot.
   
   Unrelated to the original motivation of this PR but I took the opportunity 
to remove API/methods that were not being used.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to