dajac commented on code in PR #15964:
URL: https://github.com/apache/kafka/pull/15964#discussion_r1604415305


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java:
##########
@@ -723,30 +757,66 @@ public void run() {
                         // If the records are not empty, first, they are 
applied to the state machine,
                         // second, then are written to the partition/log, and 
finally, the response
                         // is put into the deferred event queue.
+                        long prevLastWrittenOffset = 
context.coordinator.lastWrittenOffset();
+                        LogConfig logConfig = partitionWriter.config(tp);
+                        byte magic = logConfig.recordVersion().value;
+                        int maxBatchSize = logConfig.maxMessageSize();
+                        long currentTimeMs = time.milliseconds();
+                        ByteBuffer buffer = 
context.bufferSupplier.get(Math.min(16384, maxBatchSize));
+
                         try {
-                            // Apply the records to the state machine.
-                            if (result.replayRecords()) {
-                                // We compute the offset of the record based 
on the last written offset. The
-                                // coordinator is the single writer to the 
underlying partition so we can
-                                // deduce it like this.
-                                for (int i = 0; i < result.records().size(); 
i++) {
+                            MemoryRecordsBuilder builder = 
MemoryRecords.builder(

Review Comment:
   The `builder` is used in the above loop (L801) so we need it here.



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