<?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>12438</bug_id>
          
          <creation_ts>2011-04-06 17:38:01 +0000</creation_ts>
          <short_desc>Sync API for setVersion should specify a callback method and timeout value</short_desc>
          <delta_ts>2011-04-22 03:57:04 +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="Israel Hilerio [MSFT]">israelh</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>dgrogan</cc>
    
    <cc>eliotgra</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>47210</commentid>
    <comment_count>0</comment_count>
    <who name="Israel Hilerio [MSFT]">israelh</who>
    <bug_when>2011-04-06 17:38:01 +0000</bug_when>
    <thetext>Issues:
IDBatabaseSync.setVersion assumes that the scope of the transaction it is working on is the code that follows the API.  The current approach introduces the possibility of deadlocks.  

In addition, there is no way to specify the timeout of the SET_VERSION transaction.

Solution:
Modify the existing setVersion API to include an IDBTransactionCallback parameter together with a timeout value parameter.

IDBTransactionSync setVersion ([TreatNullAs=EmptyString] in DOMString version, in IDBTransactionCallback callback, in optional unsigned long timeout);

Parameter #2:
* callback
Description
* Defines the method in which a VERSION_CHANGE transaction will be valid.

Parameter #3:
* timeout
Description
* Defines a transaction timeout value in milliseconds that will limit the lifetime of the VERSION_CHANGE transaction.  If the parameter is not provide, the timeout value will be infinite.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47593</commentid>
    <comment_count>1</comment_count>
    <who name="Israel Hilerio [MSFT]">israelh</who>
    <bug_when>2011-04-21 23:40:27 +0000</bug_when>
    <thetext>Need to add new exceptions for the setVersion and transction methods on IDBatabaseSync interface:

New setVersion Exception:
* The setVersion method needs to throw IDBDatabaseException with a NOT_ALLOWED_ERR description when the setVersion method is called within the IDBTransactionCallback of a transaction method.

New transaction Exception:
* The transaction method needs throw IDBDatabaseException  with a NOT_ALLOWED_ERR description when the transaction method is called within the IDBTransactionCallback of a setVersion method.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47601</commentid>
    <comment_count>2</comment_count>
    <who name="Eliot Graff">eliotgra</who>
    <bug_when>2011-04-22 03:57:04 +0000</bug_when>
    <thetext>The changes described above have been added to the speclets. They will be published at the next update to the Editor&apos;s Draft.

Thanks for the precise descriptions in the bug.

Eliot</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>