ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [24/24] ignite git commit: ignite-5272 atomic
Date Fri, 09 Jun 2017 14:21:33 GMT
ignite-5272 atomic


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

Branch: refs/heads/ignite-5272-atomic
Commit: c23dc941293e8713b21aef2ebffb124154bfe70a
Parents: 31ba904
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Jun 9 17:20:48 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Jun 9 17:20:48 2017 +0300

----------------------------------------------------------------------
 .../cache/distributed/dht/atomic/GridDhtAtomicCache.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c23dc941/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
index 47031f9..67e3ebc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridDhtAtomicCache.java
@@ -2429,6 +2429,9 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
 
                 Object writeVal = op == TRANSFORM ? req.entryProcessor(i) : req.writeValue(i);
 
+                // Get readers before innerUpdate (reader cleared after remove).
+                GridDhtCacheEntry.ReaderId[] readers = entry.readersLocked();
+
                 GridCacheUpdateAtomicResult updRes = entry.innerUpdate(
                     ver,
                     nearNode.id(),
@@ -2459,8 +2462,6 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
                     /*updateCntr*/null,
                     dhtFut);
 
-                GridDhtCacheEntry.ReaderId[] readers = entry.readersLocked();
-
                 if (dhtFut != null) {
                     if (updRes.sendToDht()) { // Send to backups even in case of remove-remove
scenarios.
                         GridCacheVersionConflictContext<?, ?> conflictCtx = updRes.conflictResolveResult();
@@ -2682,6 +2683,7 @@ public class GridDhtAtomicCache<K, V> extends GridDhtCacheAdapter<K,
V> {
 
                     assert writeVal != null || op == DELETE : "null write value found.";
 
+                    // Get readers before innerUpdate (reader cleared after remove).
                     GridDhtCacheEntry.ReaderId[] readers = entry.readersLocked();
 
                     GridCacheUpdateAtomicResult updRes = entry.innerUpdate(


Mime
View raw message