You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a remaining problem that #6693 has not fixed.
An automatic client reset will fail given the following conditions:
There is existing state on disk with schema
The Realm is opened via async open
The Realm experiences a client reset
One or both of the "notify_before" or "notify_after" callbacks are set.
Additional properties have been added to the schema than already exist on disk
If all of these conditions are met, then the automatic client reset will fail with a message similar to the following: A fatal error occured during client reset: 'The following changes cannot be made in read-only schema mode:\n- Property 'Object.oid_field' has been added.'
The following modifications can be made to our existing test "Async open + client reset" to trigger this:
I now consider this a feature request rather than a bug report.
It is a fatal error for client reset in discard local mode to add properties or classes. Fundamentally, these types of schema changes cannot be discarded and then proceed to expect the app to continue to work.
In recovery mode, it is currently a fatal error to add properties or classes. This could be allowed, but unless the server is in dev mode these schema changes will ultimately cause a fatal error anyways.
This doesn't require dev mode. If you add a property on both the client and the server and the async open gets a client reset without the server first sending the updated schema then the before reset Realm will be missing the property, but the add_column instruction would not cause any problems.
There is a remaining problem that #6693 has not fixed.
An automatic client reset will fail given the following conditions:
If all of these conditions are met, then the automatic client reset will fail with a message similar to the following:
A fatal error occured during client reset: 'The following changes cannot be made in read-only schema mode:\n- Property 'Object.oid_field' has been added.'
The following modifications can be made to our existing test "Async open + client reset" to trigger this:
The text was updated successfully, but these errors were encountered: