[whatwg] [IndexedDB] Simultaneous setVersion from multiple pages

  On 2010-09-22 21:56, ben turner wrote:
> Sorry folks, this went to the wrong list! Please ignore.
>
> -Ben
>
> On Wed, Sep 22, 2010 at 12:55 PM, ben turner<bent.mozilla at gmail.com>  wrote:
>> Hi folks,
>>
>> While implementing the latest setVersion changes I came across this problem:
>>
>> Let's say that a site is open in two different windows and each
>> decides to do a setVersion request at the same time. Only one of them
>> can win, obviously, and the other must end up calling close() on
>> itself or the setVersion transaction will never run (and all database
>> activity will basically hang at that point).
>>
>> Jonas and I decided that this situation should result in the losing
>> database's request having its error handler called with DEADLOCK_ERR.
>> Does that sound reasonable to everyone?
>>
>> -Ben
>>

Hehe! That's ok.
But to to make a suggestion, may I say that simply returning a "busy / 
please try again" error would work just as fine? Each open window are 
acting as if they are two different connections, so treat them as such. 
What does other DB's like MySQL do? My guess is a busy/try again error 
right?



-- 
Roger "Rescator" H?gensen.
Freelancer - http://EmSai.net/

Received on Wednesday, 22 September 2010 21:37:33 UTC