[ 
https://issues.apache.org/jira/browse/HIVE-11495?focusedWorklogId=837201&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-837201
 ]

ASF GitHub Bot logged work on HIVE-11495:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 05/Jan/23 10:41
            Start Date: 05/Jan/23 10:41
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3908:
URL: https://github.com/apache/hive/pull/3908#discussion_r1062323607


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5144,6 +5159,7 @@ private int abortTxns(Connection dbConn, List<Long> 
txnids, boolean checkHeartbe
       if (MetastoreConf.getBoolVar(conf, 
MetastoreConf.ConfVars.METASTORE_ACIDMETRICS_EXT_ON)) {
         
Metrics.getOrCreateCounter(MetricsConstants.TOTAL_NUM_ABORTED_TXNS).inc(txnids.size());
       }
+      LOG.info("Txns are aborted successfully due to : {}", errorMsg);

Review Comment:
   The error message is not informative: something aborted because of ...  
   Maybe print ids of aborted txns? Make sure we are not doing unnecessary 
logging. see
   ````
   performTimeOuts()
    LOG.info("Aborted the following transactions due to timeout: {}", 
batchToAbort.toString());
   LOG.info("Aborted {} transactions due to timeout", numTxnsAborted);
   ````
   and
   ````
   commitTxn()
   String msg = "Aborting [" + JavaUtils.txnIdToString(txnid) + "," + commitId 
+ "]" + " due to a write conflict on " + resource +
                             " committed by " + committedTxn + " " + 
rs.getString(7) + "/" + rs.getString(8);
   ````
   





Issue Time Tracking
-------------------

    Worklog Id:     (was: 837201)
    Time Spent: 6h 10m  (was: 6h)

> Add aborted reason to transaction information.
> ----------------------------------------------
>
>                 Key: HIVE-11495
>                 URL: https://issues.apache.org/jira/browse/HIVE-11495
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore, Transactions
>    Affects Versions: 1.0.0
>            Reporter: Eugene Koifman
>            Assignee: Sourabh Badhya
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 6h 10m
>  Remaining Estimate: 0h
>
> Add logging messages mentioning the reason to abort the transaction.
> Another reason: Commit can fail due to a conflicting write from another txn 
> (since HIVE-13395)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to