Skip to content
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

Support opening a synchronized realm without synchronizing #621

Merged
merged 10 commits into from
Jun 13, 2022

Conversation

nielsenko
Copy link
Contributor

@nielsenko nielsenko commented May 30, 2022

Use the new DisconnectedSyncConfiguration to open a synchronized realm,
without actually starting a sync session.

@cla-bot cla-bot bot added the cla: yes label May 30, 2022
@nielsenko nielsenko self-assigned this May 30, 2022
Copy link
Contributor

@desistefanova desistefanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to see some test that demonstrates the use case of opening a realm with SyncFollowerConfiguration.

lib/src/configuration.dart Outdated Show resolved Hide resolved
lib/src/configuration.dart Show resolved Hide resolved
@nielsenko nielsenko force-pushed the kn/sync-realm-multiprocess branch 4 times, most recently from 5c289db to 0dc0e3a Compare June 2, 2022 08:48
@nielsenko
Copy link
Contributor Author

It is tricky to write a test that can run in a single process for this. I have a sample app that is running fine with this, and the code is really simple. I will set ready-for-review.

@nielsenko nielsenko marked this pull request as ready for review June 2, 2022 10:19
@nirinchev
Copy link
Member

Another test you can write is to create a Realm with a proper sync config, write some data, then close it. Then create a SessionlessSyncConfig pointing to the same file and open the Realm with that. It should succeed and you should be able to read the data. If you try to do it with a regular RealmConfig, that should fail.

@nielsenko nielsenko force-pushed the kn/sync-realm-multiprocess branch 2 times, most recently from 2af5d5a to 8ec4bb5 Compare June 2, 2022 19:08
@nielsenko nielsenko requested a review from blagoev June 3, 2022 07:49
@nielsenko nielsenko force-pushed the kn/sync-realm-multiprocess branch 2 times, most recently from f9f59f0 to 5b7f625 Compare June 7, 2022 15:52
test/configuration_test.dart Outdated Show resolved Hide resolved
test/configuration_test.dart Outdated Show resolved Hide resolved
lib/src/configuration.dart Outdated Show resolved Hide resolved
@blagoev
Copy link
Contributor

blagoev commented Jun 8, 2022

The change is needed, but lets discuss how to expose it.

@nielsenko nielsenko force-pushed the kn/sync-realm-multiprocess branch 2 times, most recently from 54e82ba to 34a599d Compare June 8, 2022 20:22
lib/src/configuration.dart Outdated Show resolved Hide resolved
lib/src/configuration.dart Outdated Show resolved Hide resolved
lib/src/realm_class.dart Outdated Show resolved Hide resolved
lib/src/configuration.dart Outdated Show resolved Hide resolved
@nielsenko nielsenko merged commit 0e5dbc4 into master Jun 13, 2022
@nielsenko nielsenko deleted the kn/sync-realm-multiprocess branch June 13, 2022 12:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants