kezhuw commented on a change in pull request #15397:
URL: https://github.com/apache/flink/pull/15397#discussion_r603124339



##########
File path: 
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/enumerator/KafkaSourceEnumStateSerializer.java
##########
@@ -54,8 +54,18 @@ public KafkaSourceEnumState deserialize(int version, byte[] 
serialized) throws I
             Map<Integer, Set<KafkaPartitionSplit>> currentPartitionAssignment =
                     SerdeUtils.deserializeSplitAssignments(
                             serialized, new KafkaPartitionSplitSerializer(), 
HashSet::new);
-            return new KafkaSourceEnumState(currentPartitionAssignment);
+            Set<KafkaPartitionSplit> currentAssignedSplits = new HashSet<>();

Review comment:
       How about construct a test to deserialize old version serialized 
enumerator state ? This will give us a little confidence that backward 
compatibility is preserved 😅 .




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to