dongnuo123 commented on code in PR #15442:
URL: https://github.com/apache/kafka/pull/15442#discussion_r1507823457


##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/OffsetMetadataManager.java:
##########
@@ -474,6 +474,8 @@ public CoordinatorResult<OffsetCommitResponseData, Record> 
commitOffset(
         final List<Record> records = new ArrayList<>();
         final long currentTimeMs = time.milliseconds();
         final OptionalLong expireTimestampMs = 
expireTimestampMs(request.retentionTimeMs(), currentTimeMs);
+        groupMetadataManager.maybeUpgradeEmptyGroup(group.groupId(), records, 
true);
+        final int initialRecordsSize = records.size();

Review Comment:
   This is because there is a `if (!records.isEmpty())` in L513. If any new 
records are added we need ` if (records.size() > initialRecordsSize)` instead.



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