code: public synchronized void initRunning() {
          if (!isStart()) {
              return;
          }
  
          String path = ZookeeperPathUtils.getDestinationClientRunning(this.destination, clientData.getClientId());
          // 序列化
          byte[] bytes = JsonUtils.marshalToByte(clientData);
          try {
              mutex.set(false);
              zkClient.create(path, bytes, CreateMode.EPHEMERAL);
              processActiveEnter();// 触发一下事件
              activeData = clientData;
              mutex.set(true);
          } catch (ZkNodeExistsException e) {
              bytes = zkClient.readData(path, true);
              if (bytes == null) {// 如果不存在节点，立即尝试一次
                  initRunning();
              } else {
                  activeData = JsonUtils.unmarshalFromByte(bytes, ClientRunningData.class);
                  // 如果发现已经存在,判断一下是否自己,避免活锁
                  if (activeData.getAddress().contains(":") && isMine(activeData.getAddress())) {
                      mutex.set(true);
                  }
              }
          } catch (ZkNoNodeException e) {
              zkClient.createPersistent(ZookeeperPathUtils.getClientIdNodePath(this.destination, clientData.getClientId()),
                  true); // 尝试创建父节点
              initRunning();
          } catch (Throwable t) {
              logger.error(MessageFormat.format("There is an error when execute initRunning method, with destination [{0}].",
                  destination),
                  t);
  
              // fixed issue 1220, 针对server节点不工作避免死循环
              if (t instanceof ServerNotFoundException) {
                  try {
                      Thread.sleep(1000);
                  } catch (InterruptedException e) {
                  }
              }
  
              // 出现任何异常尝试release
              releaseRunning();
              throw new CanalClientException("something goes wrong in initRunning method. ", t);
          }
      }
docs: 3,增加异常处理，保证出现异常时，running节点能被删除,否则会导致死锁