RE: [IndexedDB] coupled transactions

>
> I don't understand why the two transactions need to be coupled.


I want to use more efficient cursor walk in single transaction or
reuse transaction, since I know keys will be coming in order.

>
> The producer object has a read only transaction, so it won't commit any changes.  The consumer object has a read write transaction.  If it's modifying the same object stores the producer object is reading from, that transaction will block until the producer's transaction is inactive, so the producer will receive a coherent snapshot of data.


I got it. Thanks. Must decouple them with write transaction.

>
>
>
> - Kyle


Bufferring keys in consumer object may get efficient retrieval. Let me
know if there any efficient way to retrieving them.

Received on Tuesday, 20 November 2012 10:45:17 UTC