private void awaitDisablingPartition() throws InterruptedException {
    Properties properties = new Properties();
    properties.setProperty("helix.property.store.root.path", "/" + clusterName + "/" + PROPERTYSTORE_STR);
    HelixPropertyStoreConfig propertyStoreConfig = new HelixPropertyStoreConfig(new VerifiableProperties(properties));
    HelixPropertyStore<ZNRecord> helixPropertyStore =
        CommonUtils.createHelixPropertyStore(zkConnectStr, propertyStoreConfig, null);
    String path = PARTITION_DISABLED_ZNODE_PATH + instanceName;
    int count = 1;
    while (helixPropertyStore.exists(path, AccessOption.PERSISTENT)) {
      // Thread.sleep() pauses the current thread but does not release any locks
      Thread.sleep(clusterMapConfig.clustermapRetryDisablePartitionCompletionBackoffMs);
      logger.info("{} th attempt on checking the completion of disabling partition.", ++count);
    }
    helixPropertyStore.stop();
  }
Wait until disabling partition process has completed. This is to avoid race condition where server and Helix may
modify same InstanceConfig.
TODO remove this method after migrating ambry to PropertyStore (in Helix).
@throws InterruptedException
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixParticipant.java