You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "SourabhBadhya (via GitHub)" <gi...@apache.org> on 2023/06/01 08:36:22 UTC

[GitHub] [hive] SourabhBadhya commented on a diff in pull request #4313: HIVE-27332: Add retry backoff mechanism for abort cleanup

SourabhBadhya commented on code in PR #4313:
URL: https://github.com/apache/hive/pull/4313#discussion_r1212797567


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -92,6 +93,39 @@ class CompactionTxnHandler extends TxnHandler {
       "DELETE FROM \"TXNS\" WHERE \"TXN_ID\" NOT IN (SELECT \"TC_TXNID\" FROM \"TXN_COMPONENTS\") " +
           "AND (\"TXN_STATE\" = " + TxnStatus.ABORTED + " OR \"TXN_STATE\" = " + TxnStatus.COMMITTED + ") " +
           "AND \"TXN_ID\" < ?";
+
+  // Checks presence of the retry entry (by assigning 0 in retry retention) for the corresponding table/partition in the TXN_CLEANUP_QUEUE
+  private static final String SELECT_TXN_CLEANUP_QUEUE_PRESENCE_QUERY =
+          " SELECT \"TCQ_DATABASE\" AS \"DB\", \"TCQ_TABLE\" AS \"TBL\", \"TCQ_PARTITION\" AS \"PART\", " +
+                  "-1 AS \"MIN_TXN_START_TIME\", -1 AS \"ABORTED_TXN_COUNT\", 0 AS \"MIN_OPEN_WRITE_TXNID\", " +
+                  "-1 AS \"RETRY_RETENTION\" FROM \"TXN_CLEANUP_QUEUE\" " +

Review Comment:
   The table is removed. Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org