|
88 | 88 | * Copied from Debezium project(1.9.8.Final) to fix |
89 | 89 | * https://github.com/ververica/flink-cdc-connectors/issues/1944. |
90 | 90 | * |
91 | | - * <p>Line 1432-1443 : Adjust GTID merging logic to support recovering from job which previously |
| 91 | + * <p>Line 1454-1466 : Adjust GTID merging logic to support recovering from job which previously |
92 | 92 | * specifying starting offset on start. Uses {@link GtidUtils#fixOldChannelsGtidSet} for shared |
93 | 93 | * EARLIEST/LATEST logic. |
94 | 94 | * |
95 | | - * <p>Line 1444-1452 : Fix LATEST mode GTID merging to avoid replaying pre-checkpoint transactions |
| 95 | + * <p>Line 1467-1475 : Fix LATEST mode GTID merging to avoid replaying pre-checkpoint transactions |
96 | 96 | * when checkpoint GTID has non-contiguous ranges. Delegates to {@link |
97 | 97 | * GtidUtils#computeLatestModeGtidSet}. See FLINK-39149. |
98 | 98 | * |
99 | | - * <p>Line 1490 : Add more error details for some exceptions. |
| 99 | + * <p>Line 1526 : Add more error details for some exceptions. |
100 | 100 | * |
101 | | - * <p>Line 951-963 : Use iterator instead of index-based loop to avoid O(n²) complexity when |
| 101 | + * <p>Line 965-977 : Use iterator instead of index-based loop to avoid O(n²) complexity when |
102 | 102 | * processing LinkedList rows in handleChange method. See FLINK-38846. |
103 | 103 | * |
104 | | - * <p>Line 317, 1358-1366 : Use a {@link TableIdFilter} to skip binlog deserialization of unmatched |
105 | | - * tables. |
| 104 | + * <p>Line 324-330, 1366-1373 : Use a {@link TableIdFilter} to skip binlog deserialization of |
| 105 | + * unmatched tables. |
106 | 106 | */ |
107 | 107 | public class MySqlStreamingChangeEventSource |
108 | 108 | implements StreamingChangeEventSource<MySqlPartition, MySqlOffsetContext> { |
@@ -207,7 +207,8 @@ public MySqlStreamingChangeEventSource( |
207 | 207 | ErrorHandler errorHandler, |
208 | 208 | Clock clock, |
209 | 209 | MySqlTaskContext taskContext, |
210 | | - MySqlStreamingChangeEventSourceMetrics metrics) { |
| 210 | + MySqlStreamingChangeEventSourceMetrics metrics, |
| 211 | + boolean skipBinlogDeserializationOfUnsubscribedTables) { |
211 | 212 |
|
212 | 213 | this.taskContext = taskContext; |
213 | 214 | this.connectorConfig = connectorConfig; |
@@ -320,7 +321,13 @@ public Event nextEvent(ByteArrayInputStream inputStream) throws IOException { |
320 | 321 | } |
321 | 322 | }; |
322 | 323 |
|
323 | | - final TableIdFilter tableIdFilter = getTableIdDeserializationFilter(); |
| 324 | + LOGGER.info( |
| 325 | + "Skip binlog deserialization for unsubscribed tables: {}", |
| 326 | + skipBinlogDeserializationOfUnsubscribedTables); |
| 327 | + final TableIdFilter tableIdFilter = |
| 328 | + skipBinlogDeserializationOfUnsubscribedTables |
| 329 | + ? getTableIdDeserializationFilter() |
| 330 | + : TableIdFilter.all(); |
324 | 331 |
|
325 | 332 | // Add our custom deserializers ... |
326 | 333 | eventDeserializer.setEventDataDeserializer(EventType.STOP, new StopEventDataDeserializer()); |
|
0 commit comments