[ 
https://issues.apache.org/jira/browse/HIVE-24918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Haymant Mangla updated HIVE-24918:
----------------------------------
    Description: 
To handle:
a) If failover start config is enabled, dump operation will perform following 
tasks:

        1. Enable repl.failover.enabled prop for srcDb.

        2. Abort all the open transactions related to db under replication.

        3. Capture current Notification Id as cursor point.

        4. Fetch list of all open transactions. If still there are any txns for 
srcDb, abort them. Keep track of open txns, aborted txns and txnsWithoutLocks.

        5. Capture current notification ID as failover eventId and dump all the 
events till this eventId.

        6. Store all the info captured in Step 2, 3, 4, 5  in 
__failover_metadata_ in dump dir.

        7. Dump all the events till failover eventId.

        8. Pass location of __failover_metadata, failover eventId_ and failover 
ready status in the replication_metrics.

        9. Just before creation of DUMP ACK file, place failover_ready marker 
file in dump dir.

b) Skip subsequent repl dump instances once we have the failover_ready marker 
file placed.
c) If failover start config is disabled + dump dir contains _failover__ready 
marker file + repl.failover.enabled is unset for srcDb, then it should be 
treated as a bootstrap dump as this is the first dump operation in reverse 
direction.

e) If failover start config is disabled + dump dir contains _failover__ready 
marker file + repl.failover.enabled is set for srcDb, then dump has to rollback 
the failover process.

  was:
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, It should create a _failover_ready marker file in the dump 
dir. This marker file would contain scheduled query name
that has generated this dump.

b) Skip next repl dump instances once we have the marker file placed.


> 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: 7h 50m
>  Remaining Estimate: 0h
>
> To handle:
> a) If failover start config is enabled, dump operation will perform following 
> tasks:
>         1. Enable repl.failover.enabled prop for srcDb.
>         2. Abort all the open transactions related to db under replication.
>         3. Capture current Notification Id as cursor point.
>         4. Fetch list of all open transactions. If still there are any txns 
> for srcDb, abort them. Keep track of open txns, aborted txns and 
> txnsWithoutLocks.
>         5. Capture current notification ID as failover eventId and dump all 
> the events till this eventId.
>         6. Store all the info captured in Step 2, 3, 4, 5  in 
> __failover_metadata_ in dump dir.
>         7. Dump all the events till failover eventId.
>         8. Pass location of __failover_metadata, failover eventId_ and 
> failover ready status in the replication_metrics.
>         9. Just before creation of DUMP ACK file, place failover_ready marker 
> file in dump dir.
> b) Skip subsequent repl dump instances once we have the failover_ready marker 
> file placed.
> c) If failover start config is disabled + dump dir contains _failover__ready 
> marker file + repl.failover.enabled is unset for srcDb, then it should be 
> treated as a bootstrap dump as this is the first dump operation in reverse 
> direction.
> e) If failover start config is disabled + dump dir contains _failover__ready 
> marker file + repl.failover.enabled is set for srcDb, then dump has to 
> rollback the failover process.



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

Reply via email to