Specifications for how errors are handled during a sync operation.
Conflict (all or none flag) | Conflict (sync until conflict flag) | Unexpected Error | No error | |
---|---|---|---|---|
Update last sync date1 | No | Yes | No | Yes |
Execute rollback2 | No3 | No4 | Yes5 | No |
Execute commit | No | Yes | No | Yes |
Error type | Conflict | None | Unexpected | None |
Notes:
- Another condition is that
commit
returns success. - Abortion is also executed whenever a lifecycle hook returns
false
(other thancleanUp
). - Conflict is detected before sync is actually executed, so it's aborted prematurely, making rollback unnecessary.
- Keep changes (partially synced data before conflict).
- Rollback will have no effect if it's not implemented/supported by the user implementation.