Hi, I am trying to use unaligned checkpoints with ...
# troubleshooting
b
Hi, I am trying to use unaligned checkpoints with Flink 1.16.1 I set :
Copy code
execution.checkpointing.unaligned: true
and also in the code I tried:
Copy code
val env = StreamExecutionEnvironment.getExecutionEnvironment
    env.enableCheckpointing(120000, CheckpointingMode.AT_LEAST_ONCE)
    env.getCheckpointConfig.enableExternalizedCheckpoints(ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION)
    env.getCheckpointConfig.setCheckpointTimeout(240000)
    env.getCheckpointConfig.enableUnalignedCheckpoints()
But in the UI, it still shows it uses aligned checkpoints as shown in image. What am I missing here?
Do unaligned checkpoints work only with EXACTLY_ONCE ?
w
Yes, Unaligned checkpoints can only be enabled if
execution.checkpointing.mode
is
EXACTLY_ONCE
and if
execution.checkpointing.max-concurrent-checkpoints
is
1
.
You can find this description in docs.
And it will fallback to aligned checkpoint as the following codes:
Copy code
if (checkpointConfig.isUnalignedCheckpointsEnabled()
                && getCheckpointingMode(checkpointConfig) != CheckpointingMode.EXACTLY_ONCE) {
            LOG.warn("Unaligned checkpoints can only be used with checkpointing mode EXACTLY_ONCE");
            checkpointConfig.enableUnalignedCheckpoints(false);
        }
πŸ‘ 1