uicosp commented on code in PR #3776:
URL: https://github.com/apache/flink-cdc/pull/3776#discussion_r4323942406
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/source/config/MySqlSourceConfigFactory.java:
##########
@@ -78,6 +78,7 @@ public class MySqlSourceConfigFactory implements Serializable
{
private boolean treatTinyInt1AsBoolean = true;
private boolean useLegacyJsonFormat = true;
private boolean assignUnboundedChunkFirst = false;
+ private Map<String, String> snapshotFilters = new HashMap<>();
Review Comment:
Thanks for pointing this out. Updated MySqlSourceConfigFactory to retain
insertion order using a LinkedHashMap, and MySqlSourceConfig now takes an
immutable defensive copy that preserves that order.
The cache key in SnapshotFilterUtils is now an immutable list of immutable
entries, making it order-sensitive.
Added regression tests covering both the full Factory → SourceConfig path
and the same overlapping rules in opposite orders, verifying that each
configuration selects its own first match. The tests pass.
--
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]