protected void runDatabaseConsistencyCheck() throws Exception {
    if (System.getProperty("skipDatabaseConsistencyCheck") == null) {
      boolean fixIssues = (System.getProperty("fixDatabaseConsistency") != null);
      try {
        DatabaseConsistencyCheckResult checkResult = DatabaseConsistencyCheckHelper.runAllDBChecks(fixIssues);
        // Writing explicitly to the console is necessary as the python start script expects it.
        System.out.println("Database consistency check result: " + checkResult);
        if (checkResult.isError()) {
          System.exit(1);
        }
      }
      catch (Throwable ex) {
        // Writing explicitly to the console is necessary as the python start script expects it.
        System.out.println("Database consistency check result: " + DatabaseConsistencyCheckResult.DB_CHECK_ERROR);
        throw new Exception(ex);
      }
    }
  }
this method executes database consistency check if skip option was not added
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java