[infinispan-dev] Set of keys modified in tx
Manik Surtani
manik at jboss.org
Wed May 20 07:57:29 EDT 2009
On 20 May 2009, at 09:27, Vladimir Blagojevic wrote:
> Manik,
>
> Recall our conversation regarding adding a set of modified keys to
> tx context. You said how we can have "this set of keys updated by
> the TxInterceptor after a in-tx-scope completion of every write
> command".
>
> It seems that the best way to collect these keys is to add them in
> TxInterceptor#enlistWriteAndInvokeNext right where we add
> modifications to xaAdapter. And also the easiest way to lookup
> modified keys seems to be from ctx#getLookedUpEntries(). Traverse
> entries, get keys and copy them into a set in TransactionXaAdapter.
Hmm, I wonder if this is all a lot of hassle for an early unlock.
Perhaps it does make sense - as discussed on a separate email thread -
to just stipulate that any explicit locks acquired using lock() from
within a TX get released when the TX completes. Much easier for all
involved.
WDYT?
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org
More information about the infinispan-dev
mailing list