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

ZooKeeperRunningJobsRegistry creates an empty znode

    XMLWordPrintableJSON

Details

    Description

      ZooKeeperRunningJobsRegistry#writeEnumToZooKeeper calls

      this.client.newNamespaceAwareEnsurePath(zkPath).ensure(client.getZookeeperClient());

      This creates an empty znode in zookeeper.  If the job manager is interrupted at this point the job manager cannot recover.  When trying to restore jobs on a restarted job manager, ZooKeeperRunningJobsRegistry#getJobSchedulingStatus will throw an exception due to the empty znode. 

      Behavior was verified in a test environment where the job manager was interrupted at that point in execution leaving ZK in the following state:

      zk: localhost:2181(CONNECTED) 2] ls /flink/default
      [checkpoint-counter, checkpoints, jobgraphs, leader, leaderlatch, running_job_registry]
      [zk: localhost:2181(CONNECTED) 3] ls /flink/default/running_job_registry 
      [c982053dd0b9100967e6a9d89202f2a5]
      [zk: localhost:2181(CONNECTED) 4] get /flink/default/running_job_registry/c982053dd0b9100967e6a9d89202f2a5 
      
      [zk: localhost:2181(CONNECTED) 5] 
      

      Attachments

        Issue Links

          Activity

            People

              rburnett Ricky Burnett
              rburnett Ricky Burnett
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: