You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "vsantonastaso (via GitHub)" <gi...@apache.org> on 2026/04/21 10:31:04 UTC

[PR] [Feature][Connector-V2] Refactoring to have per-connector version management of Debezium [seatunnel]

vsantonastaso opened a new pull request, #10798:
URL: https://github.com/apache/seatunnel/pull/10798

   ## Purpose of this pull request
   
     This PR introduces an abstraction layer for Debezium version management
     across all CDC connectors, enabling independent Debezium version upgrades
     per connector without forcing a monolithic upgrade across the entire CDC
     module.
     This PR implements an adapter pattern with Service Provider Interface (SPI)
      that:
   
     - Decouples SeaTunnel CDC framework from specific Debezium versions
     - Allows each connector to declare its own `debezium.version` property
     - Provides version-agnostic interfaces (`DebeziumAdapter`,
     `DebeziumEventDispatcher`, `DebeziumSchemaHistory`)
     - Enables future independent connector upgrades (e.g., PostgreSQL → 2.7.4
     while MySQL stays on 1.9.8)
   
     **Implementation Details:**
   
     1. **New Abstraction Interfaces** (in `connector-cdc-base`):
        - `DebeziumAdapter` - SPI for version-specific implementations
        - `DebeziumEventDispatcher<P>` - Version-agnostic event dispatcher
        - `DebeziumSchemaHistory` - Version-agnostic schema history
        - `DebeziumTopicNaming<T>` - Version-agnostic topic naming
        - `TableChangeInfo` - Version-independent table schema representation
        - `DebeziumEventDispatcherConfig` - Builder for dispatcher configuration
   
     2. **Per-Connector Adapters** (created for each database):
        - PostgreSQL: `PostgresDebeziumAdapter`,
     `PostgresEventDispatcherAdapter`, `PostgresSchemaHistoryAdapter`
        - MySQL: `MySqlDebeziumAdapter`, `MySqlEventDispatcherAdapter`,
     `MySqlSchemaHistoryAdapter`
        - Oracle: `OracleDebeziumAdapter`, `OracleEventDispatcherAdapter`,
     `OracleSchemaHistoryAdapter`
        - SQL Server: `SqlServerDebeziumAdapter`,
     `SqlServerEventDispatcherAdapter`, `SqlServerSchemaHistoryAdapter`
        - MongoDB: Version property added (uses different architecture, no
     adapter needed)
   
     3. **ServiceLoader SPI Registration**:
        - Each connector registers its adapter via `META-INF/services/org.apache
     .seatunnel.connectors.cdc.base.debezium.DebeziumAdapter`
        - Runtime discovery using
     `DebeziumAdapterFactory.getAdapter("postgres")`
   
     4. **Refactored Components**:
        - `JdbcSourceEventDispatcher` - Now uses generic partition types
        - All `*SourceFetchTaskContext` classes - Load adapters and create
     components via SPI
        - Removed direct `EmbeddedDatabaseHistory` calls - Now use
     `DebeziumSchemaHistory` abstraction
   
   
   **Does this PR introduce any user-facing change?** 
   
   **How was this patch tested?** 
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the incompatibility caused by this PR.
   * [ ] If you are contributing the connector code, please check that the following files are updated:
     1. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
     2. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
     3. Add ci label in [label-scope-conf](https://github.com/apache/seatunnel/blob/dev/.github/workflows/labeler/label-scope-conf.yml)
     4. Add e2e testcase in [seatunnel-e2e](https://github.com/apache/seatunnel/tree/dev/seatunnel-e2e/seatunnel-connector-v2-e2e/)
     5. Update connector [plugin_config](https://github.com/apache/seatunnel/blob/dev/config/plugin_config)
     


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Feature][Connector-V2] Refactoring to have per-connector version management of Debezium [seatunnel]

Posted by "vsantonastaso (via GitHub)" <gi...@apache.org>.
vsantonastaso closed pull request #10798: [Feature][Connector-V2] Refactoring to have per-connector version management of Debezium
URL: https://github.com/apache/seatunnel/pull/10798


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org