This is an automated email from the ASF dual-hosted git repository.
MartijnVisser pushed a commit to branch release-1.20
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.20 by this push:
new 1263b16bc6d [FLINK-39140][test] Fix MAX_RETAINED_CHECKPOINTS not
effective in UnalignedCheckpointRescaleWithMixedExchangesITCase
1263b16bc6d is described below
commit 1263b16bc6d536ba0fd0a92646c24d9ce9f74357
Author: Rui Fan <[email protected]>
AuthorDate: Mon Mar 2 11:50:00 2026 +0100
[FLINK-39140][test] Fix MAX_RETAINED_CHECKPOINTS not effective in
UnalignedCheckpointRescaleWithMixedExchangesITCase
Move MAX_RETAINED_CHECKPOINTS from per-job config to MiniCluster cluster
config. StandaloneCompletedCheckpointStore reads this value from the
cluster-level configuration, so setting it in StreamExecutionEnvironment
had no effect (defaulting to 1). This caused checkpoint subsumption to
delete the selected checkpoint before the next job could restore from it.
(cherry picked from commit 17581beed0c684550e554136531b77f2f22db164)
---
.../UnalignedCheckpointRescaleWithMixedExchangesITCase.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointRescaleWithMixedExchangesITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointRescaleWithMixedExchangesITCase.java
index de9acdf0fb5..cdaa0c7a68b 100644
---
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointRescaleWithMixedExchangesITCase.java
+++
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointRescaleWithMixedExchangesITCase.java
@@ -92,10 +92,16 @@ public class
UnalignedCheckpointRescaleWithMixedExchangesITCase extends TestLogg
@Before
public void setup() throws Exception {
+ // MAX_RETAINED_CHECKPOINTS must be set at cluster level because
+ // StandaloneCompletedCheckpointStore reads it from the cluster config,
+ // not the per-job config. This prevents the picked checkpoint from
being
+ // subsumed and deleted before the next job restores from it.
+ Configuration clusterConfig = new Configuration();
+ clusterConfig.set(CheckpointingOptions.MAX_RETAINED_CHECKPOINTS, 50);
cluster =
new MiniClusterWithClientResource(
new MiniClusterResourceConfiguration.Builder()
- .setConfiguration(new Configuration())
+ .setConfiguration(clusterConfig)
.setNumberTaskManagers(NUM_TASK_MANAGERS)
.setNumberSlotsPerTaskManager(SLOTS_PER_TASK_MANAGER)
.build());
@@ -163,8 +169,6 @@ public class
UnalignedCheckpointRescaleWithMixedExchangesITCase extends TestLogg
// The smaller the buffer size means the fewer records are needed to
be consumed during
// aligned checkpoint.
conf.set(TaskManagerOptions.MEMORY_SEGMENT_SIZE, MemorySize.parse("1
kb"));
- // To prevent the picked checkpoint is deleted
- conf.set(CheckpointingOptions.MAX_RETAINED_CHECKPOINTS, 50);
if (recoveryPath != null) {
conf.set(StateRecoveryOptions.SAVEPOINT_PATH, recoveryPath);
}