Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34210

DefaultExecutionGraphBuilder#isCheckpointingEnabled may return Wrong Value when checkpoint disabled

    XMLWordPrintableJSON

Details

    Description

      The DefaultExecutionGraphBuilder will call 
      isCheckpointingEnabled(JobGraph jobGraph)
      to determine whether the job has enabled Checkpoint and whether to initialize CheckpointCoordinator related components such as CheckpointCoordinator, CheckpointIDCounter , etc.

       

      // DefaultExecutionGraphBuilder#isCheckpointingEnabled
      
      public static boolean isCheckpointingEnabled(JobGraph jobGraph) {
          return jobGraph.isCheckpointingEnabled();
      }

       

      The problem is that the logic for determining isCheckpointingEnable here is inaccurate, as jobGraph. getCheckpointingSettings() will not be NULL when checkpoint is not enabled, but with CheckpointCoordinatorConfiguration.DISABLED_CHECKPOINT_INTERVAL Interval

       

      // JobGraph#isCheckpointingEnabled
      
      public boolean isCheckpointingEnabled() {
      
          if (snapshotSettings == null) {
              return false;
          }
      
          return snapshotSettings.getCheckpointCoordinatorConfiguration().isCheckpointingEnabled();
      } 

       

       

      The method to fix this problem is also quite clear. We need to directly reuse the result of jobGraph.isCheckpointingEnable() here

       

      Attachments

        Issue Links

          Activity

            People

              mayuehappy Yue Ma
              mayuehappy Yue Ma
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: