[Bug 14404] Version of an IDBDatabase from an aborted version change transaction needs to be specified

https://www.w3.org/Bugs/Public/show_bug.cgi?id=14404

Jonas Sicking <jonas@sicking.cc> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #6 from Jonas Sicking <jonas@sicking.cc> 2012-01-24 03:52:24 UTC ---
The change made here is a bit unclear.

The text says "If the transaction is aborted and there is an existing database,
the values remain unchanged".

There's two things that are unclear here. By "database" you mean the
IDBDatabase(Sync) instance, right? Not the on-file database. I think we should
clarify that.

Second, does "remain unchanged" mean unchanged compared to the on-disk values,
or unchanged based on the values on the IDBDatabase instance before the
transaction was aborted?


Almost the same questions also applies to the text says that if the
VERSION_CHANGE transaction used to create a database is aborted, that "the
database will remain in the system with the default attributes".

Is "database" referring to the on-disk database or the IDBDatabase instance? I
would have assumed that the on-disk database is simply deleted if the
transaction that created it is aborted.


I think I would prefer to not have any special treatment for VERSION_CHANGE
transactions that create a database vs. ones that just upgrade the version
number. This seems simplest from an implementation point of view.


Also, there's the minor nit that aborting can happen outside of the
upgradeneeded event handler too since the transaction can span multiple success
and error events too.


I would recommend something like the following text for step 9.5:

If for any reason the VERSION_CHANGE transaction is aborted the IDBDatabase
instance which represents <var>connection</var> will remain unchanged. I.e.
it's <code>name</code>, <code>version</code> and <code>objectStoreNames</code>
properties will remain the value they were before the transaction was aborted.


(Note that objectStoreNames per the IDL is never null, though it can be an
empty list).

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 24 January 2012 03:52:28 UTC