[ 
https://issues.apache.org/jira/browse/FLINK-39426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18077758#comment-18077758
 ] 

Paras Negi commented on FLINK-39426:
------------------------------------

{*}Proposal{*}: A standalone *{{flink-connector-migration}}* bridge module that 
re-introduces the removed {{StatefulSink}} and {{TwoPhaseCommittingSink}} as 
thin deprecated wrappers over the current mixin interfaces ({{{}Sink{}}} + 
{{{}SupportsWriterState{}}}, {{Sink}} + {{{}SupportsCommitter{}}}).

*Why this over alternatives:* Adding these back directly into {{flink-core}} 
would contradict the intentional 2.0 API cleanup, while doing nothing forces 
users to wait for every connector to release a 2.x-compatible version. A 
separate opt-in module gives the ecosystem a migration bridge without 
compromising the clean 2.x API — users who need it add one dependency, and it 
can be retired once connectors catch up.

*What's still needed:* The Flink 2.x migration guide should document this 
module as an opt-in dependency for users running 1.x-compiled connectors, and 
connector projects (JDBC, Kafka, etc.) should add it as a provided dependency 
until they fully migrate to the mixin pattern.

> Flink 2.0 and Connector version compatibility issue
> ---------------------------------------------------
>
>                 Key: FLINK-39426
>                 URL: https://issues.apache.org/jira/browse/FLINK-39426
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>    Affects Versions: 2.2.0
>         Environment: dev
>            Reporter: Xueyan Wang
>            Assignee: Paras Negi
>            Priority: Critical
>              Labels: pull-request-available
>
> {code:java}
> <dependency>
>     <groupId>org.apache.flink</groupId>
>     <artifactId>flink-connector-jdbc</artifactId>
>     <version>3.3.0-1.20</version>
> </dependency> {code}
> {code:java}
> Compilation failure
> cannot access org.apache.flink.api.connector.sink2.StatefulSink [ERROR]   
> class file for org.apache.flink.api.connector.sink2.StatefulSink not found
> {code}
> Possible reason: Many existing connectors (e.g., Kafka Connector 3.x) still 
> reference {{{}StatefulSink{}}}, which was present in Flink 1.x but is being 
> phased out or changed in 2.x.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to