W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

[Bug 10088] New: The spec does not define what happens if an object store is modified while a cursor is iterating it.

From: <bugzilla@jessica.w3.org>
Date: Mon, 05 Jul 2010 18:08:01 +0000
To: public-webapps@w3.org
Message-ID: <bug-10088-2927@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10088

           Summary: The spec does not define what happens if an object
                    store is modified while a cursor is iterating it.
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: andreip@google.com
        ReportedBy: andreip@google.com
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org


It is possible to modify an object store while a cursor is iterating over its
objects in the same transaction. Right now, the behavior of the cursor is
unspecified.

We discussed the 3 solutions for handling this situation:

1. Making the cursor iterate over a snapshot of the data, that is,
modifications done during the iteration are not visible when the cursor
callbacks fire. The snapshot would be taken when the cursor is created.
2. As 1, except that the snapshot is taken when the transaction starts.
3. Cursors iterate over "live" data and modifications to the object store are
visible during the iteration.

The consensus for now is to go with solution 3. For pros and cons of each
approach as well as motivation for picking the current solution, please see:

http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/0056.html

-- 
Configure bugmail: http://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 Monday, 5 July 2010 18:08:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:39 GMT