protected static Map<Integer, String> getRegionStatusWithoutRunning(Session session)
      throws IoTDBConnectionException, StatementExecutionException {
    SessionDataSet dataSet = session.executeQueryStatement("show regions");
    final int regionIdIndex = dataSet.getColumnNames().indexOf("RegionId");
    final int regionStatusIndex = dataSet.getColumnNames().indexOf("Status");
    dataSet.setFetchSize(1024);
    Map<Integer, String> result = new TreeMap<>();
    while (dataSet.hasNext()) {
      List<Field> fields = dataSet.next().getFields();
      final int regionId = fields.get(regionIdIndex).getIntV();
      final String regionStatus = fields.get(regionStatusIndex).toString();
      if (!"Running".equals(regionStatus)) {
        result.putIfAbsent(regionId, regionStatus);
      }
    }
    return result;
  }
Check whether the original DataNode's region file has been deleted.
integration-test/src/test/java/org/apache/iotdb/confignode/it/regionmigration/IoTDBRegionOperationReliabilityITFramework.java