private void checkBeforeAlteringTopicInternal(TopicMeta topicMeta) throws SubscriptionException {
    if (isTopicExisted(topicMeta.getTopicName())) {
      return;
    }

    final String exceptionMessage =
        String.format(
            "Failed to alter topic %s, the topic is not existed", topicMeta.getTopicName());
    LOGGER.warn(exceptionMessage);
    throw new SubscriptionException(exceptionMessage);
  }
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