You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/07/27 07:38:40 UTC

[GitHub] [hive] pkumarsinha commented on a change in pull request #2529: HIVE-24946: Handle failover case during repl load

pkumarsinha commented on a change in pull request #2529:
URL: https://github.com/apache/hive/pull/2529#discussion_r677196856



##########
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:
       If you remove the property TARGET_OF_REPLICATION at this point of time which will allow the background threads like  Partition Management/ Stat Updater etc. Can we still rollback in that case? Wondering if we should delay the removal of this property until 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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org