dev-donghwan commented on code in PR #4489:
URL: https://github.com/apache/flink-cdc/pull/4489#discussion_r4349248157


##########
flink-cdc-connect/flink-cdc-source-connectors/flink-cdc-base/src/main/java/org/apache/flink/cdc/connectors/base/source/assigner/state/SnapshotPendingSplitsState.java:
##########
@@ -154,7 +154,7 @@ public List<SchemalessSnapshotSplit> getRemainingSplits() {
         return remainingSplits;
     }
 
-    public Map<String, SchemalessSnapshotSplit> getAssignedSplits() {
+    public LinkedHashMap<String, SchemalessSnapshotSplit> getAssignedSplits() {

Review Comment:
   Thanks for catching this, @leonardBang. That was my mistake: I narrowed the 
public signatures to the concrete type where the `Map` interface should have 
stayed.
   
   Addressed in 423b4d4:
   - `SnapshotPendingSplitsState` is now identical to master. The constructor 
parameter and `getAssignedSplits()` are back to `Map`, and the existing 
constructor already copies into a `LinkedHashMap`, so the assignment order is 
preserved internally.
   - `SnapshotSplitAssigner` accepts a `Map` and copies it into its 
`LinkedHashMap` field.
   - Added `SnapshotPendingSplitsStateTest`, which checks that the public 
constructor/getter descriptors still use `Map` (what callers compiled against 
older versions link against), and that the iteration order of the given map is 
kept. Against the previous revision this test fails to compile.
   



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