[infinispan-dev] batching and auto-commit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] batching and auto-commit

Mircea Markus
Hi,

ATM I cannot enable both batching and auto-commit[1] because the way the batching is implemented:
- it starts a tx, suspends it and and holds it in a thread local so that when a put arrives it can resume it
- when I do a put in a batch, the auto-commit code which runs first doesn't see any tx associated with the thread and starts and commits a new tx

Is there any reasons why the batch container/interceptor doesn't want to expose the batch induced transaction to the outside world? The only drawback I see with that is  if some other XA resource is used within the batch, it will participate in the dist tx.

[1] auto-commit is a new feature in 5.1 which injects a tx for transactional caches so that user won't have to start/stop one for single key operations.

Cheers,
Mircea  
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] batching and auto-commit

Manik Surtani

On 14 Sep 2011, at 17:01, Mircea Markus wrote:

Is there any reasons why the batch container/interceptor doesn't want to expose the batch induced transaction to the outside world? The only drawback I see with that is  if some other XA resource is used within the batch, it will participate in the dist tx.

Yup, that's the reason.  



_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev