Re: IndexedDB: ambiguity around createIndex order-of-operations

On Mon, Aug 13, 2012 at 12:23 PM, Jonas Sicking <jonas@sicking.cc> wrote:

>
> I think the two puts need to succeed. Implementation would be very
> complex and suboptimal otherwise. You need to know that there's a
> pending index-create operation and wait with firing success values for
> any requests until both all requests have succeeded and the
> index-create operation has succeeded before you can fire any events.
>
>  Yeah - I think this is just easier for developers to wrap their head
around too.

On top of that you can get circular dependencies I think since if one
> of the two put operations failed for reasons unrelated to the
> index-create, then the index-create operation would succeed.
>
> The way we handle this in gecko is that we treat index-create as a
> normal async operation.


FWIW, this is exactly what we mostly do in Chrome - and during some code
refactoring, we realized we had a choice of behaviors and went to the spec
for guidance..



>
> Suggestions for how to clarify this in the spec is welcome. At the
> very least we need a bug.
>
> https://www.w3.org/Bugs/Public/show_bug.cgi?id=18551

Alec


> / Jonas
>

Received on Monday, 13 August 2012 20:38:07 UTC