Closed Bug 595925 Opened 13 years ago Closed 13 years ago
Unshared Database in cookies (should fix intermittent test _cookies _read .js | command timed out: 300 seconds without output)
OpenDatabase shares a cache, which apparently will cause contention between the sync read and the async read/write threads. http://mxr.mozilla.org/mozilla-central/source/netwerk/cookie/nsCookieService.cpp#735 We should also update the interface doc (http://mxr.mozilla.org/mozilla-central/source/storage/public/mozIStorageService.idl#109) to state that using an unshared connection is a good idea when cache contention is expected. (Side note: should we be using mozIStorageConnection::connectionReady before using the database?)
(In reply to comment #0) > (Side note: should we be using mozIStorageConnection::connectionReady before > using the database?) No, the IDL appears to be wrong :(
Not sure if http://mxr.mozilla.org/mozilla-central/source/storage/public/mozIStorageService.idl#73 should also be removed (or rephrased, in both cases).
Assignee: nobody → dwitte
Status: NEW → ASSIGNED
Attachment #474751 - Flags: review?(sdwilsh)
Comment on attachment 474751 [details] [diff] [review] patch r+a=sdwilsh
Comment on attachment 474751 [details] [diff] [review] patch Actually, we need to get rid of exclusive locking too, which I thought we already did, but apparently did not do. r=sdwilsh with that change.
This gives us a perf improvement from 16.6ms per async operation (!) to 284us per operation. Landing this will resolve the shutdown hangs some people have been seeing. We need this so bad.
We need WAL for this, or we're going to run into sync connections failing to open because of writes occurring in the background. The alternative is to add sleep() calls to the sync connection code, which is really not cool.
Depends on: 598196
Summary: Use OpenUnsharedDatabase in cookies → Use OpenUnsharedDatabase in cookies (should fix intermittent test_cookies_read.js | command timed out: 300 seconds without output)
Possible that this is causing cookie failure when restarting the browser and you find that your logged out of forums?
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Could this have caused bug 605835?
You need to log in before you can comment on or make changes to this bug.