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

Three-level nested transactions fails if root-level and first sub transaction don't execute any operations #95

Closed
dfahlander opened this issue May 6, 2015 · 1 comment

Comments

@dfahlander
Copy link
Collaborator

See https://groups.google.com/forum/#!msg/dexiejs/b-uj775GO98/mCc6yTGPC0EJ
jsfiddle: http://jsfiddle.net/mt5mqjLL/2/

@dfahlander dfahlander changed the title Nested transactions fails if parent transaction don't execute any operation Three-level nested transactions fails if root-level and first sub transaction don't execute any operations May 7, 2015
@dfahlander
Copy link
Collaborator Author

Found the issue. It's because Dexie's virtual sub transactions behave in the same bad manner as indexedDB transactions do: They fire their 'complete' event if no operation takes place in the same tick without waiting for micro-tasks to finish. Ever since Dexie.Promise started to have it's own 'micro-task' enging (Dexie.Promise._rootExec()), our sub transaction suffer from the same issue that make IndexedDB incompatible with ES6 Promise implementation.

I also found another issue but that will be filed separately.

Having a solution for both of them and will commit them soon.

dfahlander added a commit that referenced this issue May 7, 2015
At last, trying to live up to the 'bullet proof transactions' tagline.
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

1 participant