ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [1/2] ignite git commit: 'Single get' operation optimization.
Date Wed, 18 Nov 2015 12:19:26 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-single-op-get cc99c2c21 -> 647e99041


'Single get' operation optimization.


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

Branch: refs/heads/ignite-single-op-get
Commit: fd7b0255bde85055c2cfc700deafb03870580b5e
Parents: cc99c2c
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Nov 18 15:13:20 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Nov 18 15:13:20 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/processors/cache/GridCacheAdapter.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fd7b0255/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 e3cd7dd..d19bb8d 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
@@ -1643,11 +1643,16 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
 
                 final boolean storeEnabled = !skipVals && readThrough &&
ctx.readThrough();
 
+                final boolean needEntry = storeEnabled || ctx.isSwapOrOffheapEnabled();
+
                 Map<KeyCacheObject, GridCacheVersion> misses = null;
 
                 for (KeyCacheObject key : keys) {
                     while (true) {
-                        GridCacheEntryEx entry = entryEx(key);
+                        GridCacheEntryEx entry = needEntry ? entryEx(key) : peekEx(key);
+
+                        if (entry == null)
+                            break;
 
                         try {
                             T2<CacheObject, GridCacheVersion> res = entry.innerGetVersioned(null,


Mime
View raw message