public TSStatus alterConsumerGroup(AlterConsumerGroupPlan plan) {
    acquireWriteLock();
    try {
      ConsumerGroupMeta consumerGroupMeta = plan.getConsumerGroupMeta();
      if (Objects.nonNull(consumerGroupMeta)) {
        String consumerGroupId = consumerGroupMeta.getConsumerGroupId();
        consumerGroupMetaKeeper.removeConsumerGroupMeta(consumerGroupId);
        if (!consumerGroupMeta.isEmpty()) {
          consumerGroupMetaKeeper.addConsumerGroupMeta(consumerGroupId, consumerGroupMeta);
        }
      }
      return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
    } 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