Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix wait_for_download behaviour with permission schema #5791

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

Open
nhachicha wants to merge 6 commits into main
base: main
Choose a base branch
Loading
from nh/wait_for_download_with_schema

Conversation

@nhachicha
Copy link
Collaborator

@nhachicha nhachicha commented Mar 2, 2018

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 a waitForInitialData 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.e waitForInitialData 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 ..)

nhachicha added 2 commits March 2, 2018 23:03
...hema (including Permission schema)
- Removing old workarounds for PK migrations
Copy link
Contributor

bdash commented Mar 3, 2018

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?

Copy link
Contributor

Zhuinden commented Mar 3, 2018

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+?

Copy link
Contributor

@cmelchior cmelchior left a 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 👍

Copy link
Contributor

@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.

Zhuinden reacted with thumbs up emoji Zhuinden reacted with heart emoji

Copy link
Contributor

Zhuinden commented Mar 5, 2018

Ah, that's super-rare at this point, you are right.

Copy link
Collaborator Author

This will be revisited once #5812 is implemented to solve the Readonly use case highlighted in #5791 (comment)

@nhachicha nhachicha added this to the ObjectPerm-GA milestone Mar 7, 2018
@nhachicha nhachicha changed the base branch from next-major to master March 21, 2018 17:57
Copy link
Contributor

@nhachicha I imagine this can be closed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@cmelchior cmelchior cmelchior approved these changes

Reviewers whose approvals may not affect merge requirements

Projects

None yet

Milestone

ObjectPerm-GA

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /