ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: Single 'get' optimization.
Date Wed, 18 Nov 2015 14:52:05 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-single-op-get 7e32db9b6 -> 4e1caa6ab


Single 'get' optimization.


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

Branch: refs/heads/ignite-single-op-get
Commit: 4e1caa6ab7c382abc87a3a5065f9fbe694cefd9c
Parents: 7e32db9
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Nov 18 17:51:57 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Nov 18 17:51:57 2015 +0300

----------------------------------------------------------------------
 .../dht/GridPartitionedSingleGetFuture.java            | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/4e1caa6a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
index 38b8687..0317bbb 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedSingleGetFuture.java
@@ -371,24 +371,27 @@ public class GridPartitionedSingleGetFuture extends GridFutureAdapter<Object>
im
 
                         colocated.context().evicts().touch(entry, topVer);
 
+                        if (!skipVals && cctx.config().isStatisticsEnabled())
+                            cctx.cache().metrics0().onRead(v != null);
+
                         // Entry was not in memory or in swap, so we remove it from cache.
                         if (v == null) {
                             if (isNew && entry.markObsoleteIfEmpty(ver))
                                 colocated.removeIfObsolete(key);
                         }
                         else {
-                            if (!skipVals) {
-                                if (cctx.config().isStatisticsEnabled())
-                                    cctx.cache().metrics0().onRead(true);
-
+                            if (!skipVals)
                                 setResult(v, ver);
-                            }
                             else
                                 setSkipValueResult(true, ver);
 
                             return null;
                         }
                     }
+                    else {
+                        if (!skipVals && cctx.config().isStatisticsEnabled())
+                            cctx.cache().metrics0().onRead(false);
+                    }
 
                     break;
                 }


Mime
View raw message