W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2014

Indexed DB: Opening connections, versions, and priority

From: Joshua Bell <jsbell@google.com>
Date: Wed, 26 Feb 2014 10:35:40 -0800
Message-ID: <CAD649j51w6K7QsxPOoyUqJpLLQNNTfriCtK75TtmLoLUtkzkbQ@mail.gmail.com>
To: "public-webapps@w3.org" <public-webapps@w3.org>
While looking at a Chrome bug [1], I reviewed the Indexed DB draft, section
3.3.1 [2] Opening a database:

"These steps are not run for any other connections with the same origin and
name but with a higher version"

And the note: "This means that if two databases with the same name and
origin, but with different versions, are being opened at the same time, the
one with the highest version will attempt to be opened first. If it is able
to successfully open, then the one with the lower version will receive an
error."

I interpret that as (and perhaps the spec should be updated to read): "This
means that if two open requests are made to the database with the same name
and origin at the same time, the open request with the highest version will
be processed first. If it is able to successfully open, then the request
with the lower version will receive an error."

So far as I can tell with a test [3], none of Chrome (33), Firefox (27), or
IE (10) implement this per spec. Instead of processing the request with the
highest version first, they process the first request that was received.

Is my interpretation of the spec correct? Is my test [3] correct? If yes
and yes, should we update the spec to match reality?

[1] https://code.google.com/p/chromium/issues/detail?id=225850
[2] https://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#opening
[3] http://jsfiddle.net/Nbg2K/2/
Received on Wednesday, 26 February 2014 18:36:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:22 UTC