gabriellefu commented on code in PR #23165:
URL: https://github.com/apache/kafka/pull/23165#discussion_r3833221660
##########
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/streams/StreamsCoordinatorRecordHelpers.java:
##########
@@ -101,18 +103,21 @@ public static CoordinatorRecord
newStreamsGroupMetadataRecord(
int newGroupEpoch,
long metadataHash,
int validatedTopologyEpoch,
- Map<String, String> assignmentConfigs,
+ Optional<AssignmentConfigsImpl> assignmentConfigs,
int storedDescriptionTopologyEpoch,
int failedDescriptionTopologyEpoch
) {
Objects.requireNonNull(groupId, "groupId should not be null here");
Objects.requireNonNull(assignmentConfigs, "assignmentConfigs should
not be null here");
- List<StreamsGroupMetadataValue.LastAssignmentConfig>
assignmentConfigList = assignmentConfigs.entrySet().stream()
- .map(entry -> new StreamsGroupMetadataValue.LastAssignmentConfig()
- .setKey(entry.getKey())
- .setValue(entry.getValue()))
- .toList();
+ // Configs that were never recorded stay unrecorded (an empty list);
the epoch bump check treats an
+ // unrecorded group as running the defaults.
+ List<StreamsGroupMetadataValue.LastAssignmentConfig>
assignmentConfigList =
+
assignmentConfigs.map(AssignmentConfigsImpl::toMap).orElse(Map.of()).entrySet().stream()
Review Comment:
sure, I can do the update
--
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]