public int generateNextRegionGroupId() {
    return partitionInfo.generateNextRegionGroupId();
  }
Only leader use this interface.

@return the next RegionGroupId
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java