private int getFailedCompactionRetention(Configuration conf) {
    int failedThreshold = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD);
    int failedRetention = MetastoreConf.getIntVar(conf, MetastoreConf.ConfVars.COMPACTOR_HISTORY_RETENTION_FAILED);
    if(failedRetention < failedThreshold) {
      LOG.warn("Invalid configuration {}={} < {}={}.  Will use {}={}",
          MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD.getVarname(), failedRetention,
          MetastoreConf.ConfVars.COMPACTOR_HISTORY_RETENTION_FAILED, failedRetention,
          MetastoreConf.ConfVars.COMPACTOR_INITIATOR_FAILED_THRESHOLD.getVarname(), failedRetention);
      failedRetention = failedThreshold;
    }
    return failedRetention;
  }
this ensures that the number of failed compaction entries retained is > than number of failed
compaction threshold which prevents new compactions from being scheduled.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/functions/PurgeCompactionHistoryFunction.java