zchovan commented on a change in pull request #2547:
URL: https://github.com/apache/hive/pull/2547#discussion_r680821564



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -1513,6 +1516,11 @@ public void commitTxn(CommitTxnRequest rqst)
         } else if (txnType.get() == TxnType.COMPACTION) {
           acquireTxnLock(stmt, false);
           commitId = getHighWaterMark(stmt);
+        } else if (txnType.get() != TxnType.READ_ONLY && isInsert(stmt, 
insertFilter)) {
+          stmt.executeUpdate("INSERT INTO \"WRITE_SET\" (\"WS_DATABASE\", 
\"WS_TABLE\", \"WS_PARTITION\", \"WS_TXNID\", \"WS_COMMIT_ID\", 
\"WS_OPERATION_TYPE\")" +
+              " SELECT DISTINCT \"TC_DATABASE\", \"TC_TABLE\", 
\"TC_PARTITION\", \"TC_TXNID\", " + tempCommitId + ", \"TC_OPERATION_TYPE\" " + 
insertFilter);
+          acquireTxnLock(stmt, false);

Review comment:
       it's required for later when ` updateWSCommitIdAndCleanUpMetadata(stmt, 
txnid, txnType.get(), commitId, tempCommitId);` is called
   




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