[ https://issues.apache.org/jira/browse/HIVE-24918?focusedWorklogId=573870&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-573870 ]
ASF GitHub Bot logged work on HIVE-24918: ----------------------------------------- Author: ASF GitHub Bot Created on: 30/Mar/21 04:00 Start Date: 30/Mar/21 04:00 Worklog Time Spent: 10m Work Description: hmangla98 commented on a change in pull request #2097: URL: https://github.com/apache/hive/pull/2097#discussion_r603763012 ########## File path: common/src/java/org/apache/hadoop/hive/conf/HiveConf.java ########## @@ -506,6 +506,8 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal "HDFS root scratch dir for Hive jobs which gets created with write all (733) permission. " + "For each connecting user, an HDFS scratch dir: ${hive.exec.scratchdir}/<username> is created, " + "with ${hive.scratch.dir.permission}."), + HIVE_REPL_FAILOVER("hive.repl.failover.start",false, Review comment: Done ########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplDumpTask.java ########## @@ -534,6 +562,37 @@ private boolean isTableSatifiesConfig(Table table) { return true; } + boolean isFailoverReadyState(long waitUntilTime) throws LockException { + List<TxnType> excludedTxns = Arrays.asList(TxnType.READ_ONLY, TxnType.REPL_CREATED); + ValidTxnList validTxnList = getTxnMgr().getValidTxns(excludedTxns); + + do { + List<Long> openTxnListForAllDbs = getOpenTxns(validTxnList); + if (openTxnListForAllDbs.isEmpty()) { + return true; + } + //check if all transactions that are open are inserted into the hive locks table. If not wait and check again. + //Transactions table don't contain the db information. DB information is present only in the hive locks table. + //Transactions are inserted into the hive locks table after compilation. We need to make sure all transactions + //that are open have a entry in hive locks which can give us the db information and then we only wait for open + //transactions for the db under replication and not for all open transactions. Review comment: Done -- 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: 573870) Time Spent: 1h 10m (was: 1h) > Handle failover case during Repl Dump > ------------------------------------- > > Key: HIVE-24918 > URL: https://issues.apache.org/jira/browse/HIVE-24918 > Project: Hive > Issue Type: New Feature > Reporter: Haymant Mangla > Assignee: Haymant Mangla > Priority: Major > Labels: pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > To handle: > a) Whenever user wants to go ahead with failover, during the next or > subsequent repl dump operation upon confirming that there are no pending open > transaction events, in should create a _failover_ready marker file in the > dump dir. > b) Skip next repl dump instances once we have the marker file placed. -- This message was sent by Atlassian Jira (v8.3.4#803005)