pvargacl commented on a change in pull request #1533:
URL: https://github.com/apache/hive/pull/1533#discussion_r496706923
##########
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:
This is probably a big enough change, but I was wondering if you could
return all the conflicting txnIds and writeIds. In that case if the max
conflicting txnId is less than the current one, you could skip two other call
to the HMS for validTxnList and validWriteIdList and just remove the exceptions
from the list.
----------------------------------------------------------------
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]