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

Resolve 2011 #2040

Merged
merged 1 commit into from
Jul 17, 2024
Merged

Resolve 2011 #2040

merged 1 commit into from
Jul 17, 2024

Conversation

dfahlander
Copy link
Collaborator

#2011 was another bug than #2012.

Its repro uses on.on('populate') to add objects.

Bug: The 'populate' event executes within 'versionchange' transaction and not normal 'readwrite' transaction.

Our cache is implemented using Dexie.use() middleware that overriders "transaction", "mutate" and "query".

The result was that our "mutate" override added the optimistic updates but the "transaction" override didn't follow up on these optimistic updates when the transaction settled because it only follows up on "readwrite" transactions so it left them hanging there forever.

Another bug than 2012: on.on('populate') executes within 'versionchange' transaction and not normal 'readwrite' transaction.
The result was that our "mutate" override added the optimistic updates but the "transaction" override didn't follow up on these optimistic updates because it only follows up on "readwrite" transactions so it left them hanging there forever.
@dfahlander dfahlander merged commit e41f017 into master Jul 17, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

1 participant