deniskuzZ commented on a change in pull request #1533:
URL: https://github.com/apache/hive/pull/1533#discussion_r497295391



##########
File path: 
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -1408,6 +1410,43 @@ private boolean isUpdateOrDelete(Statement stmt, String 
conflictSQLSuffix) throw
     }
   }
 
+  public long getLatestTxnInConflict(long txnid) throws MetaException {
+    Connection dbConn = null;
+    Statement stmt = null;
+
+    try {
+      dbConn = getDbConn(Connection.TRANSACTION_READ_COMMITTED);
+      stmt = dbConn.createStatement();
+
+      String writeConflictQuery = "SELECT MAX(\"COMMITTED\".\"WS_TXNID\")" +

Review comment:
       In most of the cases it will just decrease the performance. It could 
only be useful if there is a conflict with already registered in snapshot txn.




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

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