private void maybeFlushCurrentBatch(long currentTimeMs) {
            if (currentBatch != null) {
                if (currentBatch.builder.isTransactional() || (currentBatch.appendTimeMs - currentTimeMs) >= appendLingerMs) {
                    flushCurrentBatch();
                }
            }
        }
Flushes the current batch if it is transactional or if it has passed the append linger time.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/runtime/CoordinatorRuntime.java