meteor-offline-data icon indicating copy to clipboard operation
meteor-offline-data copied to clipboard

Web SQL Transaction Gridlock Bug in Chrome on Ubuntu

Open awwx opened this issue 11 years ago • 0 comments

I'm seeing horrible performance in Chrome on Ubuntu when multiple windows attempt to open a Web SQL database transaction at the same time.

What's supposed to happen is that one window at a time can open a read-write transaction on a database, or, if no read-write transaction is active, multiple windows can run a read-only transaction at the same time. If another window is currently running a transaction, the window trying to open a transaction waits until the other transaction finishes, and then gets its lock (read-write or read-only) on the database.

Contention (multiple windows trying to get a transaction at the same time) can thus cause a window to have to wait to enter a transaction. However, once a window is in a transaction, whether or not other windows are waiting shouldn't make a difference: the window can complete its database operations and commit its transaction.

However what I'm seeing is that when there's contention the database commit can be delayed for long periods of time... from a typical 15 milliseconds to 1 to 2 seconds (!) As soon as there's any contention at all, the database gets locked for such long periods that it turns into immediate gridlock.

Hopefully this won't be an issue for IndexedDB, or else offline-data probably won't be usable in Chrome on Ubuntu.

awwx avatar Jun 14 '13 18:06 awwx