private void preSetSchemaTemplate(final int templateId, final PartialPath templateSetPath)
      throws MetadataException {
    templatePreSetTable.preSetTemplate(templateId, templateSetPath);
    treeModelMTree.setTemplate(templateId, templateSetPath);
  }
Only leader use this interface. Get the maxRegionGroupNum of specified Database.

@param database DatabaseName
@param consensusGroupType SchemaRegion or DataRegion
@return maxSchemaRegionGroupNum or maxDataRegionGroupNum
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/schema/ClusterSchemaInfo.java