Note: There are a few cases of duplicates in user autocompletion which are being worked on.

IndexedDB: Start a transaction when created, not when first request is placed

RESOLVED FIXED

Status

()

Core
DOM: IndexedDB
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: sicking, Assigned: khuey)

Tracking

({dev-doc-complete})

unspecified
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

8.68 KB, patch
Ben Turner (not reading bugmail, use the needinfo flag!)
: review+
Details | Diff | Splinter Review
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.
Assignee: nobody → khuey
Created attachment 574376 [details] [diff] [review]
Patch

I slipped some cleanup in TransactionThreadPool in here too.
Attachment #574376 - Flags: review?(bent.mozilla)
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.
Attachment #574376 - Flags: review?(bent.mozilla) → review+
(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.
https://hg.mozilla.org/mozilla-central/rev/ca8665b874d8
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
OS: Mac OS X → All
Hardware: x86 → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla11

Updated

6 years ago
Depends on: 714627
No longer depends on: 714627
Keywords: dev-doc-needed
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla11 → ---
Version: Trunk → unspecified
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
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.