Skip to content

Commit 020bc33

Browse files
committed
[FLINK-35886] Leave a note for future Flink 2.0 upgrade
Fixing FLIP-471 in the old source would require some extra work, that we hopefully can avoid by removing the old source before doing the upgrade.
1 parent ea3a641 commit 020bc33

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/AbstractFetcher.java

+8
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,14 @@ private List<KafkaTopicPartitionState<T, KPH>> createPartitionStateHolders(
435435
kafkaHandle,
436436
deserializedWatermarkStrategy.createTimestampAssigner(
437437
() -> consumerMetricGroup),
438+
// When upgrading to Flink 2.0, context has to provide also
439+
// the input activity clock. This is not trivial for the old
440+
// sources. Ideally we should drop this old source before
441+
// this connector is upgraded to Flink 2.0. Otherwise, we
442+
// can avoid the compilation error without fixing the bug
443+
// addressed by the FLIP-471, by returning SystemClock,
444+
// which would reproduce the pre-FLIP-471 behavior (without
445+
// fixing the underlying bug).
438446
deserializedWatermarkStrategy.createWatermarkGenerator(
439447
() -> consumerMetricGroup),
440448
immediateOutput,

0 commit comments

Comments
 (0)