Bug 153382 - Modern IDB: SQLite backend needs to support simultaneous transactions
Summary: Modern IDB: SQLite backend needs to support simultaneous transactions
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on: 149117 153021
Blocks: 165889
  Show dependency treegraph
 
Reported: 2016-01-22 16:45 PST by Brady Eidson
Modified: 2016-12-14 20:41 PST (History)
6 users (show)

See Also:


Attachments
Current WIP for revisiting later (9.95 KB, patch)
2016-02-03 10:14 PST, Brady Eidson
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews113 for mac-yosemite (904.50 KB, application/zip)
2016-02-18 11:12 PST, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (969.89 KB, application/zip)
2016-02-18 11:18 PST, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2016-01-22 16:45:56 PST
Modern IDB: SQLite backend needs to support simultaneous transactions

During development they're being disabled (https://bugs.webkit.org/show_bug.cgi?id=153381), but we'll need to re-work the SQLiteIDBTransaction model to support more than one.
Comment 1 Brady Eidson 2016-02-03 10:13:16 PST
My planned approach here was to:
1 - Have read-only transactions not actually backed by a SQLiteTransaction
2 - Allow only one writing transaction at a time
3 - Have the writing transaction open a new connection to the SQLiteDatabase, with a begin/end transaction around the write.

I started implementing this but quickly ran into the problem of when the write transaction was finally in progress, the database file was locked and therefore the read-only transactions started throwing "database locked" errors.

I *THINK* there's supposed to be a way around this with some mix of SQLite arguments (Making sure to use WAL mode along with some specific locking modes), but I am going to put this on the back burner for now.

Having "one transaction at a time" gives us parity with Legacy IDB, but Modern IDB is still way-way-way better in every *other* way, so this is not a regression.

Attaching my current patch to maybe revisit later.
Comment 2 Brady Eidson 2016-02-03 10:14:04 PST
Created attachment 270584 [details]
Current WIP for revisiting later
Comment 3 Brady Eidson 2016-02-18 10:43:24 PST
Since we're already at parity with Legacy IDB, and improving this might be difficult, I'm inverting the blocking relationships such that this is blocked by the feature bug, meaning we can revisit it once we're feature complete.
Comment 4 Build Bot 2016-02-18 11:12:15 PST
Comment on attachment 270584 [details]
Current WIP for revisiting later

Attachment 270584 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/850696

Number of test failures exceeded the failure limit.
Comment 5 Build Bot 2016-02-18 11:12:19 PST
Created attachment 271675 [details]
Archive of layout-test-results from ews113 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews113  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-02-18 11:18:35 PST
Comment on attachment 270584 [details]
Current WIP for revisiting later

Attachment 270584 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/850732

Number of test failures exceeded the failure limit.
Comment 7 Build Bot 2016-02-18 11:18:39 PST
Created attachment 271676 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5