private void deleteInvalidOpenTransactions(List<Long> txnIds) throws MetaException {
    try {
      sqlRetryHandler.executeWithRetry(new SqlRetryCallProperties().withCallerId("deleteInvalidOpenTransactions"),
          () -> {
            jdbcResource.execute(new DeleteInvalidOpenTxnsCommand(txnIds));
            LOG.info("Removed transactions: ({}) from TXNS", txnIds);
            jdbcResource.execute(new RemoveTxnsFromMinHistoryLevelCommand(txnIds));
            return null;
          });
    } catch (TException e) {
      throw new MetaException(e.getMessage());
    }    
  }
Isolation Level Notes
Plain: RC is OK
This will find transactions that have timed out and abort them.
Will also delete locks which are not associated with a transaction and have timed out
Tries to keep transactions (against metastore db) small to reduce lock contention.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java