deniskuzZ commented on code in PR #4313:
URL: https://github.com/apache/hive/pull/4313#discussion_r1205825962
##########
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:
why it's called TXN_CLEANUP_QUEUE, are we cleaning TXNS entries or
TXN_COMPONENTS?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]