-
Notifications
You must be signed in to change notification settings - Fork 61
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
Realm Flexible Sync - Syncs all data twice #1472
Comments
Hi @gauravbordoloi When you say it resyncs the data again. How are you detecting that? |
Hi @cmelchior After first time sync, I am checking the item count of After 2nd time open, with same query it shows me an item count of 0, and after an interval (Realm syncs data again), the item count gradually increases from 0 to 15.5k (with batches), meaning it's syncing the data again From 3rd time this behaviour doesn't occur |
Hmm, interesting. Judging from the code, it looks fine. Are you 100% sure it is the same user being returned the 2nd time around and that |
Yes @cmelchior , that was my first doubt, so logged the same and found out it was the same user. |
Hi @cmelchior Any lead on this? |
Hi, I have had a similar (or same) issue. I saw a duplicate set of files being created on my device the second time I was running my app. At first I was not setting the name on the SyncConfiguration.Builder, so it was using the default one, and it caused the issue. I then tried setting it, and now the issue was gone. I see that, you are also setting the name, but you have a .realm in the end. I have just tried to add that to my name, and now it duplicates again. So perhaps you can try and remove the .realm, from your DB_NAME and see if it works? |
Okay, I'm able to reproduce this now. It only happens after an app restart and if the realm file name ends with It is possible to work around it by setting a custom name on the SyncConfiguration that doesn't end with |
This was fixed in Realm Core 13.23.1, which was released in Realm Kotlin 1.12.0 |
How frequently does the bug occur?
Always
Description
When I first open realm with flexible sync, it syncs all the data. If I close it and open it for the 2nd time, it again resyncs the whole data. And this only happens for the 2nd time. From 3rd time onwards, it works as expected.
My Realm Code -
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
1.10.2
What Atlas App Services are you using?
Both Atlas Device Sync and Atlas App Services
Are you using encryption?
No
Platform OS and version(s)
Android, All versions
Build environment
No response
The text was updated successfully, but these errors were encountered: