public TSStatus alterMultipleTopics(AlterMultipleTopicsPlan plan) {
    acquireWriteLock();
    try {
      TSStatus status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
      status.setSubStatus(new ArrayList<>());
      for (AlterTopicPlan subPlan : plan.getSubPlans()) {
        TSStatus innerStatus = alterTopic(subPlan);
        status.getSubStatus().add(innerStatus);
        if (innerStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
          status.setCode(TSStatusCode.ALTER_TOPIC_ERROR.getStatusCode());
          break;
        }
      }

      // If all sub-plans are successful, set the sub-status to null
      // Otherwise, keep the sub-status to indicate the failing plan's index
      if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
        status.setSubStatus(null);
      }
      return status;
    } finally {
      releaseWriteLock();
    }
  }
Caller should ensure that the method is called in the lock {@link #acquireWriteLock}.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/subscription/SubscriptionInfo.java