W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

[IndexedDB] Bug#11401 -We should disallow .transaction() from within setVersion transactions

From: Israel Hilerio <israelh@microsoft.com>
Date: Tue, 3 May 2011 19:10:31 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D040AB5@TK5EX14MBXC113.redmond.corp.microsoft.com>
We expect async operations to be queue up and executed in the order in which they were created.  Thus, the request to create a second transaction inside the onsuccess handler of a setVersion request using a .transaction() method would fail as long as we were inside a VERSION_CHANGE transaction.  The reason being that the VERSION_CHANGE transaction locks the complete db.

It seems we wouldn't want to allow this type of scenario.  Do we expect this to be a realistic scenario?  Is there a reason why we wouldn't just throw a NOT_ALLOWED_ERR.  Could we modify the transaction method information to say something like:

-->Throws an IDBDatabaseException of NOT_ALLOWED_ERR when the transaction() method is called within the onsuccess handler of a setVersion request.

This would simply the Async model and keep it consistent with the Sync model.


[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=11401
Received on Tuesday, 3 May 2011 19:11:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:19 UTC