@Override
  public long getTargetTxnId(String replPolicy, long sourceTxnId) throws MetaException {
    List<Long> targetTxnIds =jdbcResource.execute(new TargetTxnIdListHandler(replPolicy, Collections.singletonList(sourceTxnId)));
    if (targetTxnIds.isEmpty()) {
      LOG.info("Txn {} not present for repl policy {}", sourceTxnId, replPolicy);
      return -1;
    }
    assert (targetTxnIds.size() == 1);
    return targetTxnIds.get(0);
  }
Retry-by-caller note:
Worst case, it will leave an open txn which will timeout.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java