public TSStatus dropTopic(TDropTopicReq req) {
    final String topicName = req.getTopicName();
    final boolean isSetIfExistsCondition =
        req.isSetIfExistsCondition() && req.isIfExistsCondition();
    if (!subscriptionInfo.isTopicExisted(topicName, req.isTableModel)) {
      return isSetIfExistsCondition
          ? RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)
          : RpcUtils.getStatus(
              TSStatusCode.TOPIC_NOT_EXIST_ERROR,
              String.format(
                  "Failed to drop topic %s. Failures: %s does not exist.", topicName, topicName));
    }
    return configManager.getProcedureManager().dropTopic(topicName);
  }
Caller should ensure that the method is called in the write lock of {@link #subscriptionInfo}.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/subscription/SubscriptionCoordinator.java