Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8ADBE17EC9 for ; Fri, 18 Sep 2015 14:31:40 +0000 (UTC) Received: (qmail 53800 invoked by uid 500); 18 Sep 2015 14:31:34 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 53769 invoked by uid 500); 18 Sep 2015 14:31:34 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 53760 invoked by uid 99); 18 Sep 2015 14:31:34 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Sep 2015 14:31:34 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 05196E040F; Fri, 18 Sep 2015 14:31:34 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.apache.org Message-Id: <074f750d14284f24a3421c7112a43693@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ignite git commit: ignite-1.4-perf Date: Fri, 18 Sep 2015 14:31:34 +0000 (UTC) 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 Authored: Fri Sep 18 17:31:26 2015 +0300 Committer: sboikov 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;