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

when cleanup ZooKeeper Paths, high-availability.zookeeper.path.root doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.13.1
    • 1.13.1
    • flink-contrib
    • Flink 1.13.1

    • flink 1.13.1
    • Patch

    Description

      When  I use "high-availability.zookeeper.path.root",

      but execute tryDeleteEmptyParentZNodes, it doesn't work,It is possible that there is a problem in org.apache.flink.runtime.highavailability.zookeeper.ZooKeeperHaServices#isRootPath

       

         private void tryDeleteEmptyParentZNodes() throws Exception {
              // try to delete the parent znodes if they are empty
              String remainingPath = 
                              getParentPath(getNormalizedPath(client.getNamespace()));       
      final CuratorFramework nonNamespaceClient = client.usingNamespace(null);
              
              while (!isRootPath(remainingPath)) {
                  try {
                      nonNamespaceClient.delete().forPath(remainingPath);
                  } catch (KeeperException.NotEmptyException ignored) {
                      // We can only delete empty znodes
                      break;
                  }            remainingPath = getParentPath(remainingPath);
              }
          }
      

       

      private static boolean isRootPath(String remainingPath) {
           return ZKPaths.PATH_SEPARATOR.equals(remainingPath);
       }

      when i use "high-availability.zookeeper.path.root" , remainingPath should equals the root path that I specified

      Attachments

        Activity

          People

            Unassigned Unassigned
            m_jelly shouzuo meng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 96h
                96h
                Remaining:
                Remaining Estimate - 96h
                96h
                Logged:
                Time Spent - Not Specified
                Not Specified