[ https://issues.apache.org/jira/browse/HIVE-24881?focusedWorklogId=569585&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-569585 ]
ASF GitHub Bot logged work on HIVE-24881: ----------------------------------------- Author: ASF GitHub Bot Created on: 22/Mar/21 09:09 Start Date: 22/Mar/21 09:09 Worklog Time Spent: 10m Work Description: klcopp commented on a change in pull request #2068: URL: https://github.com/apache/hive/pull/2068#discussion_r598534948 ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java ########## @@ -5086,8 +5093,10 @@ public void performTimeOuts() { while(true) { stmt = dbConn.createStatement(); String s = " \"TXN_ID\" FROM \"TXNS\" WHERE \"TXN_STATE\" = " + TxnStatus.OPEN + - " AND \"TXN_LAST_HEARTBEAT\" < " + getEpochFn(dbProduct) + "-" + timeout + - " AND \"TXN_TYPE\" != " + TxnType.REPL_CREATED.getValue(); + " AND \"TXN_LAST_HEARTBEAT\" < " + getEpochFn(dbProduct) + "-" + + (replication ? replicationTxnTimeout : timeout) + + " AND \"TXN_TYPE\" " + Review comment: @aasha Thanks for taking a look. performTimeOuts() calls performTimeOutsInternal twice: 1. times out non-repl txns -> timeout is timeout and TXN_TYPE != REPL_CREATED 2. times out repl txns -> timeout is replicationTxnTimeout and TXN_TYPE=REPL_CREATED I supposed this could be optimized but I don't see how it is incorrect? -- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 569585) Time Spent: 2h 40m (was: 2.5h) > Abort old open replication txns > ------------------------------- > > Key: HIVE-24881 > URL: https://issues.apache.org/jira/browse/HIVE-24881 > Project: Hive > Issue Type: Bug > Reporter: Karen Coppage > Assignee: Karen Coppage > Priority: Major > Labels: pull-request-available > Time Spent: 2h 40m > Remaining Estimate: 0h > > We should auto-abort/remove open replication txns that are older than a time > threshold (default: 24h). -- This message was sent by Atlassian Jira (v8.3.4#803005)