ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-1607 WIP
Date Wed, 21 Oct 2015 10:47:40 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1607 8fbca39bf -> ccce82152


ignite-1607 WIP


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

Branch: refs/heads/ignite-1607
Commit: ccce821523f26845c1694fc81fb1941ee907bea5
Parents: 8fbca39
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Oct 21 13:47:32 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Oct 21 13:47:32 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/GridCacheAdapter.java        | 18 +++++++++++-------
 .../processors/cache/GridCacheMapEntry.java       |  5 ++---
 .../cache/distributed/dht/GridDhtGetFuture.java   |  5 +----
 3 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ccce8215/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index fa086ff..37ee080 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -1597,14 +1597,14 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
         if (tx == null || tx.implicit()) {
             try {
-                assert keys != null;
-
                 final AffinityTopologyVersion topVer = tx == null
                     ? (canRemap ? ctx.affinity().affinityTopologyVersion(): ctx.shared().exchange().readyAffinityVersion())
                     : tx.topologyVersion();
 
                 final Map<K1, V1> map = new GridLeanMap<>(keys.size());
 
+                final boolean storeEnabled = !skipVals && readThrough &&
ctx.readThrough();
+
                 Map<KeyCacheObject, GridCacheVersion> misses = null;
 
                 for (KeyCacheObject key : keys) {
@@ -1623,12 +1623,16 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                                 expiry);
 
                             if (res == null) {
-                                GridCacheVersion ver = entry.version();
+                                if (storeEnabled) {
+                                    GridCacheVersion ver = entry.version();
 
-                                if (misses == null)
-                                    misses = new GridLeanMap<>();
+                                    if (entry.startVersion() == ver.order()) {
+                                        if (misses == null)
+                                            misses = new GridLeanMap<>();
 
-                                misses.put(key, ver);
+                                        misses.put(key, ver);
+                                    }
+                                }
                             }
                             else {
                                 if (needVer) {
@@ -1663,7 +1667,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
                     }
                 }
 
-                if (!skipVals && misses != null && readThrough &&
ctx.readThrough()) {
+                if (storeEnabled && misses != null) {
                     final Map<KeyCacheObject, GridCacheVersion> loadKeys = misses;
 
                     final IgniteTxLocalAdapter tx0 = tx;

http://git-wip-us.apache.org/repos/asf/ignite/blob/ccce8215/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 ce841f2..4c1136f 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
@@ -3211,13 +3211,12 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
         GridCacheVersion curVer,
         GridCacheVersion newVer)
         throws IgniteCheckedException, GridCacheEntryRemovedException {
+        assert newVer != null;
+
         checkObsolete();
 
         if (curVer == null || curVer.equals(ver)) {
             if (val != this.val) {
-                if (newVer == null)
-                    newVer = nextVersion();
-
                 CacheObject old = rawGetOrUnmarshalUnlocked(false);
 
                 long ttl = ttlExtras();

http://git-wip-us.apache.org/repos/asf/ignite/blob/ccce8215/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
index 182adc1..7108da6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtGetFuture.java
@@ -303,10 +303,7 @@ public final class GridDhtGetFuture<K, V> extends GridCompoundIdentityFuture<Col
                     GridDhtCacheEntry e = cache().entryExx(k.getKey(), topVer);
 
                     try {
-                        GridCacheEntryInfo info = e.info();
-
-                        // If entry is obsolete.
-                        if (info == null)
+                        if (e.obsolete())
                             continue;
 
                         boolean addReader = (!e.deleted() && k.getValue() &&
!skipVals);


Mime
View raw message