ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # ignite-1043 review
Date Mon, 22 Jun 2015 11:45:39 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-1043 c516679a4 -> 6e99d4e4c


# ignite-1043 review


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/6e99d4e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/6e99d4e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/6e99d4e4

Branch: refs/heads/ignite-1043
Commit: 6e99d4e4c4d40ec0db8f0531151811087473a530
Parents: c516679
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Jun 22 14:45:30 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Jun 22 14:45:30 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheContext.java      |  2 +-
 .../cache/CacheReadThroughRestartSelfTest.java  | 29 +++++++++++++++-----
 2 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e99d4e4/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
index 8a4e3b9..9b7801c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java
@@ -1377,7 +1377,7 @@ public class GridCacheContext<K, V> implements Externalizable
{
     }
 
     /**
-     * @return {@code True} if store read-through mode is enabled.
+     * @return {@code True} if {@link CacheConfiguration#isLoadPreviousValue()} flag is set.
      */
     public boolean loadPreviousValue() {
         return cacheCfg.isLoadPreviousValue();

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/6e99d4e4/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
index f94b29e..7d0cd4c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheReadThroughRestartSelfTest.java
@@ -44,6 +44,12 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest
{
     @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception
{
         IgniteConfiguration cfg = super.getConfiguration(gridName);
 
+        TransactionConfiguration txCfg = new TransactionConfiguration();
+
+        txCfg.setTxSerializableEnabled(true);
+
+        cfg.setTransactionConfiguration(txCfg);
+
         CacheConfiguration cc = cacheConfiguration(gridName);
 
         cc.setLoadPreviousValue(false);
@@ -86,12 +92,18 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest
{
 
         cache = ignite.cache(null);
 
-        try (Transaction tx = ignite.transactions().
-            txStart(TransactionConcurrency.PESSIMISTIC, TransactionIsolation.REPEATABLE_READ,
100000, 1000)) {
-            for (int k = 0; k < 1000; k++)
-                assertNotNull("Null key. [key=key" + k + "].", cache.get("key" + k));
+        for (TransactionConcurrency txConcurrency : TransactionConcurrency.values()) {
+            for (TransactionIsolation txIsolation : TransactionIsolation.values()) {
+                try (Transaction tx = ignite.transactions().txStart(txConcurrency, txIsolation,
100000, 1000)) {
+                    for (int k = 0; k < 1000; k++) {
+                        String key = "key" + k;
+
+                        assertNotNull("Null value for key: " + key, cache.get(key));
+                    }
 
-            tx.commit();
+                    tx.commit();
+                }
+            }
         }
     }
 
@@ -112,7 +124,10 @@ public class CacheReadThroughRestartSelfTest extends GridCacheAbstractSelfTest
{
 
         cache = ignite.cache(null);
 
-        for (int k = 0; k < 1000; k++)
-            assertNotNull("Null key. [key=key" + k + "].", cache.get("key" + k));
+        for (int k = 0; k < 1000; k++) {
+            String key = "key" + k;
+
+            assertNotNull("Null value for key: " + key, cache.get(key));
+        }
     }
 }


Mime
View raw message