chia7712 commented on code in PR #20739:
URL: https://github.com/apache/kafka/pull/20739#discussion_r2450445429


##########
coordinator-common/src/main/java/org/apache/kafka/coordinator/common/runtime/CoordinatorRuntime.java:
##########
@@ -833,7 +833,7 @@ private void flushCurrentBatch() {
          */
         private void maybeFlushCurrentBatch(long currentTimeMs) {
             if (currentBatch != null) {
-                if (currentBatch.builder.isTransactional() || 
(currentBatch.appendTimeMs - currentTimeMs) >= appendLingerMs || 
!currentBatch.builder.hasRoomFor(0)) {
+                if (currentBatch.builder.isTransactional() || (currentTimeMs - 
currentBatch.appendTimeMs) >= appendLingerMs || 
!currentBatch.builder.hasRoomFor(0)) {

Review Comment:
   Could you add a unit test here? Since the existing tests don't update the 
mock time, this bug was not disclosed



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