[
https://issues.apache.org/jira/browse/HIVE-24881?focusedWorklogId=566764&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-566764
]
ASF GitHub Bot logged work on HIVE-24881:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Mar/21 08:17
Start Date: 16/Mar/21 08:17
Worklog Time Spent: 10m
Work Description: pvargacl commented on a change in pull request #2068:
URL: https://github.com/apache/hive/pull/2068#discussion_r594944972
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java
##########
@@ -5067,6 +5069,25 @@ private void timeOutLocks(Connection dbConn) {
*/
@RetrySemantics.Idempotent
public void performTimeOuts() {
+ try {
+ // time out non-replication txns
+ String epochFn = getEpochFn(dbProduct);
+ String timeoutTxnsQuery = " \"TXN_ID\" FROM \"TXNS\" WHERE \"TXN_STATE\"
= " + TxnStatus.OPEN +
+ " AND \"TXN_LAST_HEARTBEAT\" < " + epochFn + "-" + timeout +
+ " AND \"TXN_TYPE\" != " + TxnType.REPL_CREATED.getValue();
+ performTimeOutsInternal(timeoutTxnsQuery);
+
+ // time out replication txns (has different timeout value)
+ String timeoutReplicationTxnsQuery = " \"TXN_ID\" FROM \"TXNS\" WHERE
\"TXN_STATE\" = " + TxnStatus.OPEN +
Review comment:
I think it should go in one query with some OR criteria
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 566764)
Time Spent: 40m (was: 0.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: 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)