public TSStatus dropSubscription(TDropSubscriptionReq req) {
    final String subscriptionId = req.getSubsciptionId();
    final boolean isSetIfExistsCondition =
        req.isSetIfExistsCondition() && req.isIfExistsCondition();
    final Optional<Pair<String, String>> topicNameWithConsumerGroupName =
        subscriptionInfo.parseSubscriptionId(subscriptionId, req.isTableModel);
    if (!topicNameWithConsumerGroupName.isPresent()) {
      return isSetIfExistsCondition
          ? RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS)
          : RpcUtils.getStatus(
              TSStatusCode.TOPIC_NOT_EXIST_ERROR,
              String.format(
                  "Failed to drop subscription %s. Failures: %s does not exist.",
                  subscriptionId, subscriptionId));
    }
    return configManager
        .getProcedureManager()
        .dropSubscription(
            new TUnsubscribeReq()
                .setConsumerId(null)
                .setConsumerGroupId(topicNameWithConsumerGroupName.get().right)
                .setTopicNames(Collections.singleton(topicNameWithConsumerGroupName.get().left)));
  }
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