harshal-16 commented on code in PR #5841:
URL: https://github.com/apache/hive/pull/5841#discussion_r2191900356


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -513,23 +516,53 @@ public long getTargetTxnId(String replPolicy, long 
sourceTxnId) throws MetaExcep
 
   @Override
   public void abortTxn(AbortTxnRequest rqst) throws NoSuchTxnException, 
MetaException, TxnAbortedException {
+    List<TxnWriteDetails> txnWriteDetails = new ArrayList<>();
+    if (transactionalListeners != null) {
+      //Find the write details for this transaction.
+      //Doing it here before the metadata tables are updated below.
+      txnWriteDetails = getWriteIdsForTxnID(rqst.getTxnid());

Review Comment:
   getAllWriteEventInfo calls the txn_write_notification_log table, which has 
much more information than just the write ID. i.e., tableObj, a file list for a 
given write operation.
   For truncate, I wanted to add a dummy entry into txn_write_notification_log 
so getAllWriteEventInfo returns the value. But later on we figured out that 
there are much more DDL operations that require write ID (all those that 
implement DDLDescWithWriteId)
   So, checking the txn_to_write_id table and enhancing the commit message in 
the notification_log table was the only viable option. 



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to