realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

Implement client reset automatic recover on partition based sync #7698

Closed clementetb closed 1 year ago

clementetb commented 1 year ago

This PR adds support for the two new client reset modes, RecoverUnsycedChanges and RecoverOrDiscardUnsyncedChanges in partition sync Realms.

RecoverUnsycedChanges would try to recover the client unsynced changes. It fallbacks to a manual client reset if it cannot recover the data.

RecoverOrDiscardUnsycedChanges would try to recover the client unsynced changes. It discard any unsynced changes if it cannot recover the data.

The default client reset mode is now RecoverOrDiscardUnsycedChanges.

Flexible sync new client reset modes are implemented by https://github.com/realm/realm-java/pull/7707