You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Jean-Marc Paulin <jm...@gmail.com> on 2025/10/28 16:56:59 UTC

Contemplating upgrading from 1.20 to 2.x

Hi,

We are currently using Flink 1.20.3 with the kafka connector and are
planning to upgrade to Flink 2.x for our streaming application.

Do you have an estimated timeline for when the Kafka connector will be
available for Flink 2.x releases?

Additionally, with the upgrade of Kryo from 2.24.0 to 5.6.2 in Flink 2.x,
we are concerned about state compatibility. Will a Flink 2.x streaming
application be able to resume from a 1.20.3 application state? Is there a
method to determine if our existing application state has a dependency on
Kryo that would prevent a smooth upgrade?

Thanks,

JM

Re: Contemplating upgrading from 1.20 to 2.x

Posted by Gabor Somogyi <ga...@gmail.com>.
Hi Jean-Marc,

The Kafka connector for Flink 2.x is already available starting with the
Flink Kafka Connector 4.0.0 release,
which is compatible with Flink 2.0.x. So if you plan to upgrade to Flink
2.x, you should use the 4.x line of the connector.

Regarding state compatibility, Flink 2.x introduces an upgrade of Kryo from
2.24.0 to 5.6.2.
This can potentially break compatibility for any state serialized using
Kryo.
However:
- If your application state is based on POJOs, Avro, Protobuf, or custom
TypeInformation serializers, it should remain compatible.
- Only operators or state that explicitly rely on Kryo serialization (e.g.,
types not covered by Flink’s type system and falling back to Kryo) may face
compatibility issues.

To check whether Kryo is used in your state:

1. Run your application with the config option

-Dexecution.checkpointing.unaligned.enabled=false
-Dexecution.savepoint.serializer-check=VERBOSE

or use the state.checkpoints.dir inspection tool to print serializers.

2. Look for log lines mentioning KryoSerializer — if none appear, your
state should be safe to migrate.

If Kryo is used, you’ll likely need to take a full stop-and-restore
migration:
- Export data from the current state
- Deploy the Flink 2.x job with a clean state, then reload data

For most typical use cases that don’t rely on Kryo, Flink’s built-in
savepoint compatibility will allow restoring from 1.20.x to 2.0.x without
issues.

BR,
G


On Tue, Oct 28, 2025 at 5:57 PM Jean-Marc Paulin <jm...@gmail.com>
wrote:

> Hi,
>
> We are currently using Flink 1.20.3 with the kafka connector and are
> planning to upgrade to Flink 2.x for our streaming application.
>
> Do you have an estimated timeline for when the Kafka connector will be
> available for Flink 2.x releases?
>
> Additionally, with the upgrade of Kryo from 2.24.0 to 5.6.2 in Flink 2.x,
> we are concerned about state compatibility. Will a Flink 2.x streaming
> application be able to resume from a 1.20.3 application state? Is there a
> method to determine if our existing application state has a dependency on
> Kryo that would prevent a smooth upgrade?
>
> Thanks,
>
> JM
>