@Override
  public void processLoadSnapshot(final File snapshotDir) throws IOException {
    processMTreeLoadSnapshot(
        snapshotDir,
        TREE_SNAPSHOT_FILENAME,
        stream -> {
          treeModelMTree.clear();
          treeModelMTree.deserialize(stream);
        });
    processMTreeLoadSnapshot(
        snapshotDir,
        TABLE_SNAPSHOT_FILENAME,
        stream -> {
          tableModelMTree.clear();
          tableModelMTree.deserialize(stream);
        });
    templateTable.processLoadSnapshot(snapshotDir);
    templatePreSetTable.processLoadSnapshot(snapshotDir);
  }
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