W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2012

RE: [IndexedDB] coupled transactions

From: Kyaw Tun <kyawtun@yathit.com>
Date: Tue, 20 Nov 2012 18:44:50 +0800
Message-ID: <CAFPCW97nf7CdwZPtg_OaZnfKeCNmsnvPEM+qdLowCdEeX0am3w@mail.gmail.com>
To: public-webapps@w3.org
> 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

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:50 UTC