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-1.4-perf
Date Fri, 18 Sep 2015 14:31:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1.4-perf [created] 8a5cef6e1


ignite-1.4-perf


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

Branch: refs/heads/ignite-1.4-perf
Commit: 8a5cef6e1e0aa9767c46a0670b9a57d0daac8432
Parents: 7ccd0b3
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Sep 18 17:31:26 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Sep 18 17:31:26 2015 +0300

----------------------------------------------------------------------
 .../query/h2/opt/GridH2AbstractKeyValueRow.java | 31 +++++++-------------
 1 file changed, 11 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8a5cef6e/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
index 07c49a5..63e2bc3 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2AbstractKeyValueRow.java
@@ -182,11 +182,9 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
     /** {@inheritDoc} */
     @Override public Value getValue(int col) {
         if (col < DEFAULT_COLUMNS_COUNT) {
-            Value v;
+            Value v = peekValue(col);
 
             if (col == VAL_COL) {
-                v = syncValue(0);
-
                 long start = 0;
                 int attempt = 0;
 
@@ -208,15 +206,11 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
                         Object valObj = desc.readFromSwap(k);
 
                         if (valObj != null) {
-                            // Even if we've found valObj in swap, it is may be some new
value,
-                            // while the needed value was already unswapped, so we have to
recheck it.
-                            if ((v = WeakValue.unwrap(syncValue(0))) == null && (v
= getOffheapValue(VAL_COL)) == null) {
-                                Value upd = desc.wrap(valObj, desc.valueType());
+                            Value upd = desc.wrap(valObj, desc.valueType());
 
-                                v = updateWeakValue(upd);
+                            v = updateWeakValue(upd);
 
-                                return v == null ? upd : v;
-                            }
+                            return v == null ? upd : v;
                         }
                         else {
                             // If nothing found in swap then we should be already unswapped.
@@ -236,21 +230,18 @@ public abstract class GridH2AbstractKeyValueRow extends GridH2Row {
                             ". This can happen due to a long GC pause.");
                 }
             }
-            else {
-                assert col == KEY_COL : col;
 
-                v = peekValue(KEY_COL);
+            if (v == null) {
+                assert col == KEY_COL : col;
 
-                if (v == null) {
-                    v = getOffheapValue(KEY_COL);
+                v = getOffheapValue(KEY_COL);
 
-                    assert v != null;
+                assert v != null : v;
 
-                    setValue(KEY_COL, v);
+                setValue(KEY_COL, v);
 
-                    if (peekValue(VAL_COL) == null)
-                        cache();
-                }
+                if (peekValue(VAL_COL) == null)
+                    cache();
             }
 
             assert !(v instanceof WeakValue) : v;


Mime
View raw message