<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>10088</bug_id>
          
          <creation_ts>2010-07-05 18:08:01 +0000</creation_ts>
          <short_desc>The spec does not define what happens if an object store is modified while a cursor is iterating it.</short_desc>
          <delta_ts>2010-11-08 11:34:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrei Popescu">andreip</reporter>
          <assigned_to name="Jonas Sicking (Not reading bugmail)">jonas</assigned_to>
          <cc>jonas</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>36602</commentid>
    <comment_count>0</comment_count>
    <who name="Andrei Popescu">andreip</who>
    <bug_when>2010-07-05 18:08:01 +0000</bug_when>
    <thetext>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 &quot;live&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41908</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-01 04:50:50 +0000</bug_when>
    <thetext>Working at rewriting cursor handling, especially related to indexes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42257</commentid>
    <comment_count>2</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-08 11:34:59 +0000</bug_when>
    <thetext>Should be fixed by http://dvcs.w3.org/hg/IndexedDB/rev/8716288a4fe1

Would be great if someone could check that it looks correct.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>