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


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -708,6 +734,13 @@ private void removeTxnComponents(Connection dbConn, 
CompactionInfo info) throws
     PreparedStatement pStmt = null;
     ResultSet rs = null;
     try {
+      /*
+       * Remove all retry associated metadata of table/partition in the 
TXN_CLEANUP_QUEUE both when compaction
+       * or abort cleanup is successful. We dont want a situation wherein we 
have a retry queue entry for a table
+       * but no corresponding entry in TXN_COMPONENTS table.
+       */
+      removeRetryQueueEntries(dbConn, info);

Review Comment:
   @deniskuzZ Created a dedicated class called TxnCleanupQueueHandler which 
will manage any write on TXN_CLEANUP_QUEUE table.



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java:
##########
@@ -708,6 +734,13 @@ private void removeTxnComponents(Connection dbConn, 
CompactionInfo info) throws
     PreparedStatement pStmt = null;
     ResultSet rs = null;
     try {
+      /*
+       * Remove all retry associated metadata of table/partition in the 
TXN_CLEANUP_QUEUE both when compaction

Review Comment:
   @deniskuzZ Compaction can clean abort files, hence removing associated 
TXN_COMPONENTS records. This means we can have a situation wherein there are no 
TXN_COMPONENTS records but we could have retry records. To ensure this, we need 
to remove the retry records if present whenever compaction on the 
table/partition is successful.



-- 
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]

Reply via email to