veghlaci05 commented on a change in pull request #3034:
URL: https://github.com/apache/hive/pull/3034#discussion_r811765534



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java
##########
@@ -1430,6 +1428,44 @@ public void markRefused(CompactionInfo info) throws 
MetaException {
     updateStatus(info);
   }
 
+
+  @Override
+  @RetrySemantics.CannotRetry
+  public void updateCompactionRetry(CompactionInfo info, long retentionTime) 
throws MetaException {
+    try {
+      Connection dbConn = null;
+      PreparedStatement stmt = null;
+      try {
+        dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+        stmt = dbConn.prepareStatement("UPDATE \"COMPACTION_QUEUE\" SET 
\"CQ_TBLPROPERTIES\" = ?, CQ_COMMIT_TIME = ? "
+                + " WHERE \"CQ_ID\" = ?");
+        stmt.setString(1, info.properties);
+        stmt.setLong(2, retentionTime);
+        stmt.setLong(3, info.id);
+        int updCnt = stmt.executeUpdate();
+        if (updCnt != 1) {
+          LOG.error("Unable to update compaction queue record: " + info + ". 
updCnt=" + updCnt);
+          LOG.debug("Going to rollback");
+          dbConn.rollback();

Review comment:
       Just like for the previous item: Added for consistency. Every other 
methods are doing the same (markCompacted, markCleaned, etc.)




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