hmangla98 commented on a change in pull request #2529:
URL: https://github.com/apache/hive/pull/2529#discussion_r677297935
##########
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:
Yes, rollback may be impacted. But we can't delay this removal until
first dump also. As dump operation will itself fail if db is target of
replication.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]