@Override
  public MetricsInfo getMetricsInfo() throws MetaException {
    int threshold = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.METASTORE_ACIDMETRICS_TABLES_WITH_ABORTED_TXNS_THRESHOLD);
    MetricsInfo metrics = jdbcResource.execute(MetricsInfoHandler.INSTANCE);
    Set<String> resourceNames = jdbcResource.execute(new TablesWithAbortedTxnsHandler(threshold));
    metrics.setTablesWithXAbortedTxnsCount(resourceNames.size());
    metrics.setTablesWithXAbortedTxns(resourceNames);    
    return metrics;
  }
We assume this is only called by metadata cache server to know if there are new base/delta files should be read.
The query filters compactions by state and only returns SUCCEEDED or READY_FOR_CLEANING compactions because
only these two states means there are new files ready to be read.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java