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

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

                Author: ASF GitHub Bot
            Created on: 19/Oct/22 09:33
            Start Date: 19/Oct/22 09:33
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #3656:
URL: https://github.com/apache/hive/pull/3656#discussion_r999190297


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -5085,16 +5087,21 @@ private int abortTxns(Connection dbConn, List<Long> 
txnids, boolean checkHeartbe
       StringBuilder prefix = new StringBuilder();
       StringBuilder suffix = new StringBuilder();
 
-      // add update txns queries to query list
-      prefix.append("UPDATE \"TXNS\" SET \"TXN_STATE\" = 
").append(TxnStatus.ABORTED)
-              .append(" WHERE \"TXN_STATE\" = 
").append(TxnStatus.OPEN).append(" AND ");
       if (checkHeartbeat) {
-        suffix.append(" AND \"TXN_LAST_HEARTBEAT\" < ")
-                .append(getEpochFn(dbProduct)).append("-").append(timeout);
+        LOG.info(TxnErrorMsg.ABORT_TIMEOUT.toString() + timeout);

Review Comment:
   can we keep the generic part and just add extra stuff under the if section?





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

    Worklog Id:     (was: 818385)
    Time Spent: 1h 10m  (was: 1h)

> 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: Simhadri Govindappa
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> Should add TXNS.COMMENT field or something like that so that if the system 
> aborts a transaction (due to timeout, for example) we can add a message to 
> that effect to the aborted 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