<?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>25251</bug_id>
          
          <creation_ts>2014-04-03 18:20:58 +0000</creation_ts>
          <short_desc>Transaction ordering for readonly transactions</short_desc>
          <delta_ts>2014-11-14 01:12:28 +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>All</rep_platform>
          <op_sys>All</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="Joshua Bell">jsbell</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>art.barstow</cc>
    
    <cc>israelh</cc>
    
    <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>103366</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-04-03 18:20:58 +0000</bug_when>
    <thetext>Tracking bug for this conversation:

http://lists.w3.org/Archives/Public/public-webapps/2014JanMar/0575.html

Short version, c/o Jonas:

&quot;Specifically, there is nothing that says that if a readonly transaction is created after a readwrite transaction, that the readonly transaction runs after the readwrite transaction. This is true even if the two transactions have
overlapping scopes.&quot;

.. and then further details about this, since Chrome takes advantage of this but it can be unexpected for developers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114910</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-11-14 00:07:13 +0000</bug_when>
    <thetext>I suggest replacing the paragraph starting with &quot;If multiple &quot;readwrite&quot; transactions are attempting...&quot; with the following:

Any transaction _created_ after a &quot;readwrite&quot; transaction MUST see the changes written by the &quot;readwrite&quot; transaction. So if a &quot;readwrite&quot; transaction, A, is created, and later another transaction B, is created, and the two transactions have overlapping scopes, then B MUST see any changes made to any object stores that are part of that overlapping scope. Due to the requirements in the previous paragraph, this also means that the B transaction does not have access to any object stores in that overlapping scope until the A transaction is _finished_.

And then change the note to:

Generally speaking, the above requirements mean that any transaction which has an overlapping scope with a &quot;readwrite&quot; transaction and which was created after that &quot;readwrite&quot; transaction, can&apos;t run in parallel with that &quot;readwrite&quot; transaction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114911</commentid>
    <comment_count>2</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-11-14 00:28:16 +0000</bug_when>
    <thetext>Just confirming: are we file with still allowing &quot;readonly&quot; transactions to snapshot and thus not block subsequently created &quot;readwrite&quot; transactions with overlapping scope?

Spec text is: &quot;There are a number of ways that an implementation ensures this. The implementation can prevent any &quot;readwrite&quot; transaction, whose scope overlaps the scope of the &quot;readonly&quot; transaction, from starting until the &quot;readonly&quot; transaction finishes. Or the implementation can allow the &quot;readonly&quot; transaction to see a snapshot of the contents of the object stores which is taken when the &quot;readonly&quot; transaction started.&quot;

Chrome implements snapshots, Firefox does not appear to, i.e. in FF a readonly transaction will block a readwrite transaction with overlapping scope. I was thinking of this as the same issue, but I&apos;m okay with a more scoped change as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114912</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-11-14 00:51:54 +0000</bug_when>
    <thetext>I&apos;ve incorporated Jonas&apos; suggestions in comment #1 the ED</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114913</commentid>
    <comment_count>4</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2014-11-14 01:08:17 +0000</bug_when>
    <thetext>(In reply to Joshua Bell from comment #2)
&gt; Just confirming: are we file with still allowing &quot;readonly&quot; transactions to
&gt; snapshot and thus not block subsequently created &quot;readwrite&quot; transactions
&gt; with overlapping scope?

Yup. The proposal that I put in comment 1 still allows that, right?

&gt; Chrome implements snapshots, Firefox does not appear to, i.e. in FF a
&gt; readonly transaction will block a readwrite transaction with overlapping
&gt; scope. I was thinking of this as the same issue, but I&apos;m okay with a more
&gt; scoped change as well.

I&apos;m fine that. This doesn&apos;t seem to result in interoperability problems. Just results in Firefox being slower.

Do you agree?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114915</commentid>
    <comment_count>5</comment_count>
    <who name="Joshua Bell">jsbell</who>
    <bug_when>2014-11-14 01:12:28 +0000</bug_when>
    <thetext>(In reply to Jonas Sicking from comment #4)
&gt; Yup. The proposal that I put in comment 1 still allows that, right?

Yes.

&gt; I&apos;m fine that. This doesn&apos;t seem to result in interoperability problems.
&gt; Just results in Firefox being slower.
&gt; 
&gt; Do you agree?

Agreed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>