private String checkRegionOperationModelCorrectness(TConsensusGroupId regionId, Model model) {
    String databaseName = configManager.getPartitionManager().getRegionDatabase(regionId);
    boolean isTreeModelDatabase = databaseName.startsWith(SqlConstant.TREE_MODEL_DATABASE_PREFIX);
    if (Model.TREE == model && isTreeModelDatabase
        || Model.TABLE == model && !isTreeModelDatabase) {
      return null;
    }
    return String.format(
        "The region's database %s is belong to %s model, but the model you are operating is %s",
        databaseName,
        isTreeModelDatabase ? Model.TREE.toString() : Model.TABLE.toString(),
        model.toString());
  }
The common checks of all region operations, include migration, reconstruction, extension,
removing

@param regionId region group id, also called consensus group id
@param targetDataNode DataNode should in Running status
@param relatedDataNodes Pair<Identity, Node Location>
@return The reason if check failed, or null if check pass
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java