Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -800,11 +800,11 @@ public static boolean isUnalignedCheckpointInterruptibleTimersEnabled(Configurat
* execution.
*
* @param config the configuration to check
* @return {@code true} if unaligned checkpoint during recovery is enabled, {@code false}
* @return {@code true} if unaligned checkpointing during recovery is enabled, {@code false}
* otherwise
*/
@Internal
public static boolean isUnalignedDuringRecoveryEnabled(Configuration config) {
public static boolean isCheckpointingDuringRecoveryEnabled(Configuration config) {
if (!config.get(UNALIGNED_RECOVER_OUTPUT_ON_DOWNSTREAM)) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,14 +333,16 @@ void testIsUnalignedCheckpointInterruptibleTimersEnabled() {
void testIsUnalignedDuringRecoveryEnabled() {
// Test when both options are disabled (default) - should return false
Configuration defaultConfig = new Configuration();
assertThat(CheckpointingOptions.isUnalignedDuringRecoveryEnabled(defaultConfig))
assertThat(CheckpointingOptions.isCheckpointingDuringRecoveryEnabled(defaultConfig))
.as("During-recovery should be disabled by default")
.isFalse();

// Test when during-recovery is enabled but recover-output-on-downstream is disabled
Configuration onlyDuringRecoveryConfig = new Configuration();
onlyDuringRecoveryConfig.set(CheckpointingOptions.UNALIGNED_DURING_RECOVERY_ENABLED, true);
assertThat(CheckpointingOptions.isUnalignedDuringRecoveryEnabled(onlyDuringRecoveryConfig))
assertThat(
CheckpointingOptions.isCheckpointingDuringRecoveryEnabled(
onlyDuringRecoveryConfig))
.as(
"During-recovery should be disabled when recover-output-on-downstream is not enabled")
.isFalse();
Expand All @@ -350,7 +352,7 @@ void testIsUnalignedDuringRecoveryEnabled() {
onlyRecoverOnDownstreamConfig.set(
CheckpointingOptions.UNALIGNED_RECOVER_OUTPUT_ON_DOWNSTREAM, true);
assertThat(
CheckpointingOptions.isUnalignedDuringRecoveryEnabled(
CheckpointingOptions.isCheckpointingDuringRecoveryEnabled(
onlyRecoverOnDownstreamConfig))
.as("During-recovery should be disabled when during-recovery option is not enabled")
.isFalse();
Expand All @@ -359,7 +361,7 @@ void testIsUnalignedDuringRecoveryEnabled() {
Configuration bothEnabledConfig = new Configuration();
bothEnabledConfig.set(CheckpointingOptions.UNALIGNED_RECOVER_OUTPUT_ON_DOWNSTREAM, true);
bothEnabledConfig.set(CheckpointingOptions.UNALIGNED_DURING_RECOVERY_ENABLED, true);
assertThat(CheckpointingOptions.isUnalignedDuringRecoveryEnabled(bothEnabledConfig))
assertThat(CheckpointingOptions.isCheckpointingDuringRecoveryEnabled(bothEnabledConfig))
.as(
"During-recovery should be enabled when both recover-output-on-downstream and during-recovery are enabled")
.isTrue();
Expand All @@ -369,7 +371,9 @@ void testIsUnalignedDuringRecoveryEnabled() {
explicitlyDisabledConfig.set(
CheckpointingOptions.UNALIGNED_RECOVER_OUTPUT_ON_DOWNSTREAM, false);
explicitlyDisabledConfig.set(CheckpointingOptions.UNALIGNED_DURING_RECOVERY_ENABLED, true);
assertThat(CheckpointingOptions.isUnalignedDuringRecoveryEnabled(explicitlyDisabledConfig))
assertThat(
CheckpointingOptions.isCheckpointingDuringRecoveryEnabled(
explicitlyDisabledConfig))
.as(
"During-recovery should be disabled when recover-output-on-downstream is explicitly false")
.isFalse();
Expand Down
Loading