Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28772: Clear REPL_TXN_MAP table on DR when deleting replication policy #5656

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

harshal-16
Copy link
Contributor

Details:
Problem :

  • Suppose user is doing incremental replication. As per current design it can happen that a transaction can span across replication cycles.
  • So, if open transaction gets replayed to DR side and a user deletes the databases and policy on both Src and DR side then there will be dangling entry in REPL_TXN_MAP table on the DR side.
  • If a user creates the database name with the same name as previous then after 11 days housekeeper thread deletes the REPL_TXN_MAP dangling entry which basically sets the database incompatible in the newly created database from new replication policy.

Solution :

  • while deleting REPL LOAD scheduled query, it will check for Repl Created Transactions on DR side and if there is any then it will abort it and put the flag repl.Incompatible on DR side which indicates the transaction was aborted so bootstrap will be required for future replication.
  • By any means if user try to resume the replication then DR will be in inconsistent state. * if there are no Repl created open transactions then it will be the same operation as current

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

Is the change a dependency upgrade?

How was this patch tested?

…policy

Details:
Problem :
* Suppose user is doing incremental replication. As per current design it can happen that a transaction can span across replication cycles.
* So, if open transaction gets replayed to DR side and a user deletes the databases and policy on both Src and DR side then there will be dangling entry in REPL_TXN_MAP table on the DR side.
* If a user creates the database name with the same name as previous then after 11 days housekeeper thread deletes the REPL_TXN_MAP dangling entry which basically sets the database incompatible in the newly created database from new replication policy.

Solution :
* while deleting REPL LOAD scheduled query, it will check for Repl Created Transactions on DR side and if there is any then it will abort it and put the flag repl.Incompatible on DR side which indicates the transaction was aborted so bootstrap will be required for future replication.
* By any means if user try to resume the replication then DR will be in inconsistent state. * if there are no Repl created open transactions then it will be the same operation as current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants