Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Failed disaster recovery should indicate whether partial updates have been made #261

Merged
merged 1 commit into from
May 13, 2016

Conversation

krasserm
Copy link
Contributor

@krasserm krasserm self-assigned this May 13, 2016
@krasserm krasserm added this to the 0.8 milestone May 13, 2016
links = recovery.recoveryLinks(infos, clocks)
_ <- recovery.deleteSnapshots(links)
_ <- recovery.deleteSnapshots(links).recoverWith(recoveryFailure(partialUpdate = true))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure: Is partialUpdate = true here because the application might have deleted events under the assumption that the state is stored in the snapshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snapshots that cover events that have been lost during a disaster must be removed. This is what recovery.deleteSnapshots(links) is doing. If this operation fails, partialUpdate is set to true because it might have partially deleted some local snapshots already.

Copy link
Contributor

@magro magro May 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Learning eventuate more and more :-)

Btw: would it be a possible optimization to compare received infos and clocks with the locally stored data and abort/skip recovery (and this snapshot deletion)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we could consider that when evolving disaster recovery.

@magro
Copy link
Contributor

magro commented May 13, 2016

What about a minor doc update? Apart from that it LGTM.

@krasserm
Copy link
Contributor Author

I'm a bit hesitant adding it to the reference documentation, as I'm not sure yet how disaster recovery will evolve in the next release (discussion to be done). It's anyway documented in the API docs. I'd rather like to extend the reference documentation later when we agreed upon how to proceed with disaster recovery in context of #142.

@volkerstampa
Copy link
Contributor

LGTM

@krasserm
Copy link
Contributor Author

Thanks for the review @magro and @volkerstampa

@krasserm krasserm merged commit 8d89967 into master May 13, 2016
@krasserm krasserm deleted the wip-260-disaster-recovery-special-exception branch May 17, 2016 12:53
@krasserm krasserm modified the milestones: 0.8, 0.7.1 May 18, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed disaster recovery should indicate whether partial updates have been made
3 participants