public void checkBeforeAlterConsumerGroupInternal(ConsumerGroupMeta consumerGroupMeta)
      throws SubscriptionException {
    if (isConsumerGroupExisted(consumerGroupMeta.getConsumerGroupId())) {
      return;
    }

    // Consumer group not exist, not allowed to alter
    final String exceptionMessage =
        String.format(
            "Failed to alter consumer group because the consumer group %s does not exist",
            consumerGroupMeta.getConsumerGroupId());
    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