SourabhBadhya commented on code in PR #3908:
URL: https://github.com/apache/hive/pull/3908#discussion_r1064833234


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5150,6 +5166,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.warn("Txns are aborted successfully due to : {}. Aborted Transaction 
IDs : {}", errorMsg, txnids);

Review Comment:
   Used this format of logging as suggested - 
   `LOG.info("Aborted transactions {} due to {}", txnids, errorMsg);`
   
   Updated the error msgs to make it concise in TxnErrorMsg.



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5094,12 +5109,13 @@ private int abortTxns(Connection dbConn, List<Long> 
txnids,
    * @throws SQLException
    */
   private int abortTxns(Connection dbConn, List<Long> txnids, boolean 
checkHeartbeat,
-                        boolean skipCount, boolean isReplReplayed)
+                        boolean skipCount, boolean isReplReplayed, TxnErrorMsg 
errorMsg)
       throws SQLException, MetaException {
     Statement stmt = null;
     if (txnids.isEmpty()) {
       return 0;
     }
+    LOG.debug("Trying to abort txns due to : {}. Aborted Transaction IDs : 
{}", errorMsg, txnids);

Review Comment:
   Implemented as suggested.



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