eric666666 opened a new pull request, #4466:
URL: https://github.com/apache/flink-cdc/pull/4466

   ## PR Description
   
   ### What is the purpose of the change
   
   Add a new option `scan.emit.create-table-events.in-batch.enabled` for MySQL 
CDC pipeline connector. When enabled, all CreateTableEvents are collected and 
emitted in batch during the snapshot initialization phase, significantly 
reducing schema coordination overhead in scenarios with thousands of tables.
   
   ### Brief change log
   
   - `MySqlDataSourceOptions`: Add 
`SCAN_EMIT_CREATE_TABLE_EVENTS_IN_BATCH_ENABLED` config option (default `false`)
   - `MySqlDataSourceFactory`: Read config and pass to 
`MySqlSourceConfigFactory`
   - `MySqlSourceConfig` / `MySqlSourceConfigFactory`: Add 
`emitCreateTableEventsInBatchEnabled` field and accessors
   - `MySqlPipelineRecordEmitter`: Add `shouldBatchEmitCreateTableEvents()` 
helper; batch-emit all cached CreateTableEvents on first record, populate 
`alreadySendCreateTableTables` to prevent duplicate emissions
   
   ### Verifying this change
   
   - Added `MySqlPipelineRecordEmitterTest` (6 test cases) covering:
     - Batch emit when enabled
     - Batch emit only once (idempotent)
     - No batch emit when disabled
     - Empty cache no-op
     - Config default propagation
   - Updated `MySqlDataSourceFactoryTest.testOptionalOption` to verify option 
registration and propagation
   


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