ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject incubator-ignite git commit: # IGNITE-283: Fixed assertion failure in ATOMIC cache.
Date Fri, 20 Feb 2015 07:11:11 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-283-tx 0336d5760 -> 76e203bad


# IGNITE-283: Fixed assertion failure in ATOMIC cache.


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

Branch: refs/heads/ignite-283-tx
Commit: 76e203bade0f5914c76109bca69b762f6dd661f4
Parents: 0336d57
Author: vozerov <vozerov@gridgain.com>
Authored: Fri Feb 20 10:11:06 2015 +0300
Committer: vozerov <vozerov@gridgain.com>
Committed: Fri Feb 20 10:11:06 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheMapEntry.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/76e203ba/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 00b69ca..b3b61f1 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
@@ -1860,11 +1860,14 @@ public abstract class GridCacheMapEntry<K, V> implements GridCacheEntryEx<K,
V>
                 if (conflictCtx == null) {
                     // Calculate TTL and expire time for local update.
                     if (explicitTtl != CU.TTL_NOT_CHANGED) {
-                        // TTL/expireTime was sent to us from node where conflict had been
resolved.
-                        assert explicitExpireTime != CU.EXPIRE_TIME_CALCULATE;
+                        // If conflict existed, expire time must be explicit.
+                        assert conflictVer == null || explicitExpireTime != CU.EXPIRE_TIME_CALCULATE;
 
                         newSysTtl = newTtl = explicitTtl;
-                        newSysExpireTime = newExpireTime = explicitExpireTime;
+                        newSysExpireTime = explicitExpireTime;
+
+                        newExpireTime = explicitExpireTime != CU.EXPIRE_TIME_CALCULATE ?
+                            explicitExpireTime : CU.toExpireTime(explicitTtl);
                     }
                     else {
                         newSysTtl = expiryPlc == null ? CU.TTL_NOT_CHANGED :


Mime
View raw message