You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/08/01 14:11:00 UTC

[jira] [Work logged] (HIVE-24946) Handle failover case during Repl Load

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

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

                Author: ASF GitHub Bot
            Created on: 01/Aug/21 14:10
            Start Date: 01/Aug/21 14:10
    Worklog Time Spent: 10m 
      Work Description: pkumarsinha commented on a change in pull request #2529:
URL: https://github.com/apache/hive/pull/2529#discussion_r680517039



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/exec/repl/ReplLoadTask.java
##########
@@ -554,6 +554,24 @@ public void run() throws SemanticException {
           }
         }
       });
+      if (work.shouldFailover()) {
+        listOfPreAckTasks.add(new PreAckTask() {
+          @Override
+          public void run() throws SemanticException {
+            try {
+              Database db = getHive().getDatabase(work.getTargetDatabase());
+              if (!MetaStoreUtils.isTargetOfReplication(db)) {
+                return;
+              }
+              LOG.info("Removing property: {} from database: {}", ReplConst.TARGET_OF_REPLICATION, db.getName());
+              db.getParameters().remove(ReplConst.TARGET_OF_REPLICATION);

Review comment:
       We can remove this property as the first dump in reverse direction




-- 
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-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

    Worklog Id:     (was: 632078)
    Time Spent: 2.5h  (was: 2h 20m)

> Handle failover case during Repl Load
> -------------------------------------
>
>                 Key: HIVE-24946
>                 URL: https://issues.apache.org/jira/browse/HIVE-24946
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Haymant Mangla
>            Assignee: Haymant Mangla
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> To handle:
>  # Introduce two states of failover db property to denote nature of database at the time failover was initiated.
>  # If failover start config is enabled and dump directory contains failover marker file, then in incremental load as a preAckTask, we should
>  ## Remove repl.target.for from target db.
>  ## Set repl.failover.endpoint = "TARGET"
>  ## Updated the replication metrics saying that target cluster is failover ready
>  # In the first dump operation in reverse direction, presence of failover ready marker and repl.failover.endpoint = "TARGET" will be used as indicator for bootstrap iteration.
>  # In any dump operation except the first dump operation in reverse dxn, if repl.failover.endpoint is set for db and failover start config is set to false, then remove this property.
>  # In incremental load, if the failover start config is disabled, then add repl.target.for and remove repl.failover.endpoint if present.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)