Hi Dmitry,

Looks like you start transaction on node "grid(0)", but update value on
another node "grid(1)".
So, technically, it is not nested transactions, right?

On Wed, Apr 12, 2017 at 7:32 PM, Дмитрий Рябов <[email protected]>
wrote:

> Hello, igniters. I start the node and create a transactional cache on it,
> on the other node I start the transaction and "put" in previously created
> cache and rollback transaction. So what should I get? Value stored before
> transaction or inside rolled transaction?
>
> public void testRollback() throws Exception {
>     startGrid(0);
>     startGrid(1);
>     IgniteCache<Integer, Integer> cache1 = grid( 1).cache(null);
>     cache1.put(1, 1);
>     try (Transaction tx = grid(0).transactions().txStart(PESSIMISTIC, 
> READ_COMMITTED)) {
>         cache1.put(1, 1111);
>         tx.rollback();
>     }
>     assertEquals((Integer) 1, cache1.get(1));
> }
>
>
> The question is why I got 1111 instead of 1? If it is right behaviour -
> why it nowhere explained?
>
>
>


-- 
Best regards,
Andrey V. Mashenkov

Reply via email to