Sebastien Pereira created FLINK-39061:
-----------------------------------------
Summary: StateMachine example uses State V2 API, breaking
canonical savepoint compatibility and version upgrade workflow
Key: FLINK-39061
URL: https://issues.apache.org/jira/browse/FLINK-39061
Project: Flink
Issue Type: Bug
Components: Examples
Affects Versions: 2.2.0, 2.1.0, 2.0.0
Reporter: Sebastien Pereira
The StateMachine example was updated to use State V2 API [1], which breaks
canonical savepoint creation (default type).
Savepoint creation fails with *{{UnsupportedOperationException: Not supported
yet}}* in the Jobmanager log.
Problem found validating Flink 2.2.0 with Kubernetes Operator 1.13.0. Root
cause traced to State V2 pattern from example. Workaround: test savepointing
using
TopSpeedWindowing example.
I appreciate examples are usually meant to showcase new capabilities. However,
StateMachineExample is the only regular example migrated from State V1 to State
V2, while other State V2 examples are located in the (dedicated?) {{/dsv2/}}
directory [5].
*Should this example be reverted to State V1?*
—
State V2 API requires ForSt state backend, which does not support canonical
savepoints according to the documentation [3]
{quote}"ForStStateBackend: Does not support canonical savepoint, full snapshot,
changelog and file-merging checkpoints."
{quote}
Per community discussion [4]
{quote}"It is possible to migrate state across state backends via savepoints in
canonical format, once we complete the savepoint support for ForSt. {*}This may
take some time.{*}"
{quote}
*Is canonical savepoint support for State V2/ForSt on the roadmap?*
Per mailing list discussion [4], support is planned but timeline is unclear.
*If canonical savepoint support is far off:*
* How do users plan State V1 → State V2 migration for version portability?
* What guidance can be provided for production workflows?
---
[1] Commit 759635d - Use async state in flink-examples-streaming:
[https://github.com/apache/flink/commit/759635db069923233e7928af0c729285e739ada9]
[2] Upgrading Applications and Flink Versions:
[https://nightlies.apache.org/flink/flink-docs-master/docs/ops/upgrading/]
[3] State Backends Documentation:
[https://nightlies.apache.org/flink/flink-docs-master/docs/ops/state/state_backends/]
[4] Mailing list discussion - Flink V1 to V2 state migration (Nov 11, 2024):
[https://www.mail-archive.com/[email protected]/msg78875.html]
[5] DataStream V2 examples directory:
[https://github.com/apache/flink/tree/release-2.2.0/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/dsv2]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)