You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/10/27 14:09:52 UTC

ignite git commit: ignite-3478 add test

Repository: ignite
Updated Branches:
  refs/heads/ignite-3478 6466adf54 -> ecdeff85e


ignite-3478 add test


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

Branch: refs/heads/ignite-3478
Commit: ecdeff85ebc63dfee02635113dbfcad98d235a31
Parents: 6466adf
Author: sboikov <sb...@gridgain.com>
Authored: Fri Oct 27 17:09:47 2017 +0300
Committer: sboikov <sb...@gridgain.com>
Committed: Fri Oct 27 17:09:47 2017 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheMapEntry.java         |  4 +++-
 .../cache/mvcc/CacheMvccTransactionsTest.java       | 16 ++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ecdeff85/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 5c03769..7b62dab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -822,6 +822,8 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
             wasNew = isNew();
         }
 
+        // TODO IGNITE-3478: tests reload with mvcc enabled.
+
         String taskName = cctx.kernalContext().job().currentTaskName();
 
         // Check before load.
@@ -3253,7 +3255,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter impleme
         assert Thread.holdsLock(this);
         assert val != null : "null values in update for key: " + key;
 
-        cctx.offheap().invoke(cctx, key,  localPartition(), new UpdateClosure(this, val, ver, expireTime));
+        cctx.offheap().invoke(cctx, key, localPartition(), new UpdateClosure(this, val, ver, expireTime));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ecdeff85/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
index 6309523..5a2cecd 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/mvcc/CacheMvccTransactionsTest.java
@@ -3774,6 +3774,22 @@ public class CacheMvccTransactionsTest extends CacheMvccAbstractTest {
     }
 
     /**
+     * @throws Exception If failed.
+     */
+    public void testChangeExpireTime() throws Exception {
+        final IgniteEx node = startGrid(0);
+
+        IgniteCache cache = node.createCache(cacheConfiguration(PARTITIONED, FULL_SYNC, 1, 64));
+
+        cache.put(1, 1);
+
+        final IgniteCache expiryCache =
+            cache.withExpiryPolicy(new TouchedExpiryPolicy(new Duration(TimeUnit.SECONDS, 1)));
+
+        expiryCache.get(1);
+    }
+
+    /**
      * @param cctx Context.
      * @param row Row.
      * @param expKey Expected row key.