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

[Discussion] _localId generated via counter #955

Closed
dplewis opened this issue Oct 14, 2019 · 1 comment
Closed

[Discussion] _localId generated via counter #955

dplewis opened this issue Oct 14, 2019 · 1 comment

Comments

@dplewis
Copy link
Member

dplewis commented Oct 14, 2019

I posted a comment here about it.

There is currently an issue with a offline caching of objects. If an app (web app) reinitializes the SDK, the localId resets. The means any offline cached objects may have the same localId as another object.

iOS and android uses some form of generated long int (~8 bytes) which is then cached to the disk.

iOS

Android

I figures we could replace the counter with a UUID for localId or use something similar to it and avoid collision.

What do you think?

@dplewis dplewis changed the title [Discussion] Why is localId generated via counter [Discussion] _localId generated via counter Oct 14, 2019
@wfilleman
Copy link

@dplewis Updated my post here with my successful experiment using a UUID for localIDs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants