Hi,vkulichenko
Thanks your replying, I had been add tx.close() on my code.
"not working" when I update same cache data more than one time on same
transactional, the update will failure because query return cache data still
the old data,not the updated dirty data.
code is not working in demo project as below:
// update cache multiple time on one transactional
igniteTLS.txStart();
result = testDemo.reservedSku(cacheInfo.getSkuId(), 1);
//
-----------------------------------------------------------------------
first time to update cache,it is success
System.out.println(String.format("#2-1 return %d row updated",
result));
//
-----------------------------------------------------------------------
second time to update cache,it is failure because igniteCache.query return
cache is old data, not the first time update dirty data.
result = testDemo.reservedSku(cacheInfo.getSkuId(), 2);
System.out.println(String.format("#2-2 return %d row updated",
result));
//
-----------------------------------------------------------------------
third time to update cache,it is failure because igniteCache.query return
cache is old data, not the first time update dirty data.
result = testDemo.reservedSku(cacheInfo.getSkuId(), 3);
System.out.println(String.format("#2-3 return %d row updated",
result));
igniteTLS.commit();
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/same-cache-cannot-update-twice-in-one-transaction-tp14639p15225.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.