-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
total_rows is not consistent between worker threads and main thread #6055
Labels
bug
Confirmed bug
Comments
Technically you can also reproduce this by just using the same PouchDB in multiple tabs, so it's not safe for that case either. |
nolanlawson
added a commit
that referenced
this issue
Dec 22, 2016
nolanlawson
added a commit
that referenced
this issue
Dec 22, 2016
nolanlawson
added a commit
that referenced
this issue
Dec 22, 2016
nolanlawson
added a commit
that referenced
this issue
Dec 22, 2016
nolanlawson
added a commit
that referenced
this issue
Dec 22, 2016
nolanlawson
added a commit
that referenced
this issue
Dec 23, 2016
Removes this unsafe optimization.
nolanlawson
added a commit
that referenced
this issue
Dec 23, 2016
Removes this unsafe optimization.
nolanlawson
added a commit
that referenced
this issue
Dec 23, 2016
Removes this unsafe optimization.
nolanlawson
added a commit
that referenced
this issue
Dec 24, 2016
Removes this unsafe optimization.
daleharvey
pushed a commit
that referenced
this issue
Dec 26, 2016
Removes this unsafe optimization.
daleharvey
pushed a commit
that referenced
this issue
Dec 26, 2016
Removes this unsafe optimization.
Fixed now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's an in-memory cache for
total_rows
(akadoc_count
) in the IDB adapter. This is cute and has some perf benefits, but it also introduces inconsistencies between the worker thread and main thread because we're caching stuff in-memory, outside of the IDB transaction.Given the increasing usage of web workers and service workers, I don't think this is a safe tradeoff to make anymore. We should just remove this optimization and look for other, safer optimizations.
The text was updated successfully, but these errors were encountered: