-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix wait_for_download behaviour with permission schema #5791
base: main
Are you sure you want to change the base?
Conversation
…hema (including Permission schema) - Removing old workarounds for PK migrations
Isn't it necessary to wait for the initial download with an empty schema in order to support opening synced Realms that the user has read-only access to? |
Does that mean that if you follow one of those silly tutorials from the internet that tells you to use 0.82.2 then Realm no longer automatically upgrades the Realm to a compatible format from 5.0.0+? |
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.
CI timed out waiting for a device, but once it approves 👍
@Zhuinden Yes, but most of the bugs where only relevant if you attempted to read a Realm file created by Cocoa, so I doubt it will affect anyone. |
Ah, that's super-rare at this point, you are right. |
This will be revisited once #5812 is implemented to solve the Readonly use case highlighted in #5791 (comment) |
…waitForInitialRemoteData
@nhachicha I imagine this can be closed now? |
After the fix in Sync we should no longer need the hack that registers a subscription and wait for
Update
to be triggered in order to start locking the schema.It should only require an
asyncOpen
with awaitForInitialData
for the Realm to synchronise the permission schema from Sync (the one that includes the correction without duplicates), we can then start modifying it to lock the schema for instance.However, this was not working in Android as opposed to iOS. Basically we were doing a
waitForDownload
on an empty schema, this causes the local Realm to not upload the local Realm with the default permissions populated from the ObjectStore to Sync which will apply the permissions corrections. (i.ewaitForInitialData
was useless after at this level.)This PR, moved waitForInitialData to be performed on the Realm opened with the full schema.
Since this is the
next-major
I removed the workarounds we had on different old versions 0.8x & 2.x (PK migration, index etc ..)