lizhimins opened a new issue, #155:
URL: https://github.com/apache/rocketmq-flink/issues/155

   ### Motivation
   
   Flink 2.x removed the legacy connector APIs: `SourceFunction`, 
`SinkFunction`, `TwoPhaseCommittingSink`, `TableSchema` and the 
`ConfigOption`-typed `Configuration` accessors. This connector still carries 
the legacy implementations alongside the FLIP-27 / sink2 ones (#93), so:
   
   - it cannot compile against Flink 2.x, and no `-2.x` artifact exists;
   - every fix has to be written and reviewed twice (legacy path + new path), 
e.g. #141 / #148.
   
   ### Proposal: the maintenance model apache/flink-connector-kafka uses
   
   1. **Migrate `main` to the new API only** (FLIP-27 `Source` + sink2 `Sink` + 
`SupportsCommitter`), delete the legacy paths, and target **Flink 2.2.1 / Java 
17**. Semantics unchanged — this is an API migration, not a behavior change.
   2. **Cut a maintenance branch for the Flink 1.x line** from the 
pre-migration `main`, and apply the same new-API-only migration against 
**1.20.3**. The new APIs exist since 1.11 / 1.15, so both lines share one 
codebase.
   3. **Propagate fixes `main` -> maintenance branch by cherry-pick.** The diff 
between the two lines is only `flink.version` plus a handful of 
deprecated-overload bridges.
   
   Kafka precedent: `main` = 5.1-SNAPSHOT / Flink 2.2.1, `v3.4` = Flink 1.20, 
zero legacy on every branch, fixes land on `main` first and are backported. 
Pulsar follows the same model.
   
   ### Verification of the migration (both lines)
   
   - `mvn clean install` green on JDK 17: remoting 146 / grpc 80 unit tests, 
checkstyle / spotless zero violations, remoting + grpc SQL fat-jars produced.
   - The 1.x variant builds green against 1.20.3 with the same tests (Java 11 
bytecode). The diff between the two lines is **5 files / ~124 lines**: pom 
versions, the `Sink.InitContext` / `createSerializer(ExecutionConfig)` bridges 
that 1.20 still declares abstract, and one test package path (`sink.legacy` 
does not exist in 1.20). The 1.20 runtime also calls the 
`createWriter(WriterInitContext)` overload, so the main code path is identical 
on both lines.
   
   The PR for step 1 targets `main`; step 2 follows once the maintenance branch 
is cut.
   
   Refs #93, #127.


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