Index: incubator-ignite/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- incubator-ignite/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java (date 1455808793000) +++ incubator-ignite/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheAbstractFullApiSelfTest.java (revision ) @@ -261,6 +261,34 @@ info("Grid " + i + ": " + grid(i).localNode().id()); } + /** + * Checks that skipStore flag gets overriden inside a transaction. + * + * @throws Exception if failed. + */ + public void testWriteThroughTx() { + String key = "writeThroughKey"; + + map.remove(key); + + try (final Transaction transaction = grid(0).transactions().txStart()) { + IgniteCache cache = jcache(0); + + // retrieve market type from the grid + Integer old = cache.withSkipStore().get(key); + + assertNull(old); + + // update the grid + cache.put(key, 2); + + // finally commit the transaction + transaction.commit(); + } + + assertEquals(2, map.get(key)); + } + /** {@inheritDoc} */ @Override protected Ignite startGrid(String gridName, GridSpringResourceContext ctx) throws Exception { if (cacheCfgMap == null) Index: incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java (date 1455808793000) +++ incubator-ignite/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java (revision ) @@ -3779,6 +3779,9 @@ old.cached(entry); old.filters(filter); + // Keep old skipStore value. + old.skipStore(skipStore); + // Update ttl if specified. if (drTtl >= 0L) { assert drExpireTime >= 0L;