Last Comment Bug 700544 - IndexedDB: Start a transaction when created, not when first request is placed
: IndexedDB: Start a transaction when created, not when first request is placed
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM: IndexedDB (show other bugs)
: unspecified
: All All
: -- normal (vote)
: ---
Assigned To: Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
:
Mentors:
Depends on:
Blocks: idb
  Show dependency treegraph
 
Reported: 2011-11-07 19:34 PST by Jonas Sicking (:sicking) No longer reading bugmail consistently
Modified: 2015-12-01 01:14 PST (History)
6 users (show)
khuey: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (8.68 KB, patch)
2011-11-14 12:29 PST, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
bent.mozilla: review+
Details | Diff | Splinter Review

Description Jonas Sicking (:sicking) No longer reading bugmail consistently 2011-11-07 19:34:48 PST
I.e. given the following code:

var trans1 = db.transaction("foo", READ_WRITE);
var trans2 = db.transaction("foo", READ_WRITE);
trans2.put("2", "key");
trans1.put("1", "key");

The objectStore should after the two transactions commit contain the value "2" since trans2 should run after trans1.
Comment 1 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-14 12:29:11 PST
Created attachment 574376 [details] [diff] [review]
Patch

I slipped some cleanup in TransactionThreadPool in here too.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2011-11-16 21:38:31 PST
Comment on attachment 574376 [details] [diff] [review]
Patch

Review of attachment 574376 [details] [diff] [review]:
-----------------------------------------------------------------

Ha, you tricked me.

::: dom/indexedDB/IDBTransaction.cpp
@@ +99,5 @@
> +}
> +
> +NS_IMPL_QUERY_INTERFACE1(StartTransactionRunnable, nsIRunnable)
> +
> +StartTransactionRunnable kDummyRunnable;

Nit: Let's call this gStartTransactionRunnable.
Comment 3 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-17 03:25:34 PST
(In reply to ben turner [:bent] from comment #2)
> Comment on attachment 574376 [details] [diff] [review] [diff] [details] [review]
> Patch
> 
> Review of attachment 574376 [details] [diff] [review] [diff] [details] [review]:
> -----------------------------------------------------------------
> 
> Ha, you tricked me.

Indeed.

> ::: dom/indexedDB/IDBTransaction.cpp
> @@ +99,5 @@
> > +}
> > +
> > +NS_IMPL_QUERY_INTERFACE1(StartTransactionRunnable, nsIRunnable)
> > +
> > +StartTransactionRunnable kDummyRunnable;
> 
> Nit: Let's call this gStartTransactionRunnable.

Done.
Comment 4 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-11-18 07:24:02 PST
https://hg.mozilla.org/mozilla-central/rev/ca8665b874d8
Comment 5 Chris Mills (Mozilla, MDN editor) [:cmills] 2015-12-01 01:14:49 PST
Killing some old dev-doc-needed bugs ;-)

I've now documented this, adding a note in both the Transaction interface page, and the release notes for Firefox 11...

https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction
https://developer.mozilla.org/en-US/Firefox/Releases/11#IndexedDB

Note You need to log in before you can comment on or make changes to this bug.