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


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java:
##########
@@ -712,13 +712,14 @@ public void run() {
                         try {
                             // Apply the records to the state machine.
                             if (result.replayRecords()) {
-                                result.records().forEach(record ->
+                                for (int i = 0; i < result.records().size(); 
i++) {
                                     context.coordinator.replay(
+                                        prevLastWrittenOffset + i,

Review Comment:
   yes. the only way to speculate about what the offset will be in the log 
based on the last written offset. as the coordinator is the single writer to 
the log, it works.



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