-
Notifications
You must be signed in to change notification settings - Fork 100
Failed disaster recovery should indicate whether partial updates have been made #261
Conversation
krasserm
commented
May 13, 2016
- closes Failed disaster recovery should indicate whether partial updates have been made #260
… been made - closes #260
links = recovery.recoveryLinks(infos, clocks) | ||
_ <- recovery.deleteSnapshots(links) | ||
_ <- recovery.deleteSnapshots(links).recoverWith(recoveryFailure(partialUpdate = true)) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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.
What about a minor doc update? Apart from that it LGTM. |
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. |
LGTM |
Thanks for the review @magro and @volkerstampa |