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

How a transaction is implemented as a queue hang #291

Open
liangzhuang327 opened this issue Aug 22, 2019 · 1 comment
Open

How a transaction is implemented as a queue hang #291

liangzhuang327 opened this issue Aug 22, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@liangzhuang327
Copy link

Generally speaking, the above requirements mean that any transaction which has an overlapping scope with a read/write transaction and which was created after that read/write transaction, can’t run in parallel with that read/write transaction.(Mentioned in W3C

And my question is :
How does indexedDB do to suspend the remaining transactions when multiple read/write transactions are opened at the same time? Is it done with the browser's Event Loop?

@inexorabletash inexorabletash self-assigned this Sep 20, 2019
@inexorabletash inexorabletash added this to the vFuture milestone Oct 7, 2019
@inexorabletash
Copy link
Member

The transaction processing model is somewhat underspecified (and has been the case since the initial IDB spec); the relevant text is in https://w3c.github.io/IndexedDB/#transaction-scheduling and https://w3c.github.io/IndexedDB/#transaction-lifecycle which rather informally defines the preconditions for a transaction to start.

Ideally, the spec would define transaction scheduling e.g. as a parallel queue. The steps are not run synchronously with any agent's (document's/worker's) event queue.

PRs that firm up transaction behavior here would be welcome.

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

No branches or pull requests

2 participants