You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2016/02/15 08:52:23 UTC
[39/50] [abbrv] ignite git commit: ignite-split2 - performance
ignite-split2 - performance
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/1115a794
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/1115a794
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/1115a794
Branch: refs/heads/ignite-1232
Commit: 1115a794d785565b3d9be330595fa247cf156b7d
Parents: baba572
Author: S.Vladykin <sv...@gridgain.com>
Authored: Mon Dec 28 00:26:23 2015 +0300
Committer: S.Vladykin <sv...@gridgain.com>
Committed: Mon Dec 28 00:26:23 2015 +0300
----------------------------------------------------------------------
.../internal/processors/query/h2/opt/GridH2Table.java | 10 +++++-----
.../query/h2/twostep/GridReduceQueryExecutor.java | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/1115a794/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
index afdf40f..ceb7922 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/opt/GridH2Table.java
@@ -275,9 +275,8 @@ public class GridH2Table extends TableBase {
GridH2QueryContext qctx = GridH2QueryContext.get();
- return qctx == null || // Outside of Ignite query context.
- qctx.type() != MAP || // LOCAL and REDUCE queries.
- (qctx.type() == MAP && !qctx.hasIndexSnapshots()); // Backward compatibility.
+ // On MAP queries with distributed joins we lock tables before the queries.
+ return qctx == null || qctx.type() != MAP || !qctx.hasIndexSnapshots();
}
/**
@@ -292,7 +291,7 @@ public class GridH2Table extends TableBase {
Lock l;
// Try to reuse existing snapshots outside of the lock.
- for (long waitTime = 25;; waitTime *= 2) { // Increase wait time to avoid starvation.
+ for (long waitTime = 200;; waitTime *= 2) { // Increase wait time to avoid starvation.
snapshots = actualSnapshot.get();
if (snapshots != null) { // Reuse existing snapshot without locking.
@@ -395,7 +394,8 @@ public class GridH2Table extends TableBase {
if (reuseExisting && s == null) { // Existing snapshot was invalidated before we were able to reserve it.
// Release already taken snapshots.
- qctx.clearSnapshots();
+ if (qctx != null)
+ qctx.clearSnapshots();
for (int j = 1; j < i; j++)
index(j).releaseSnapshot();
http://git-wip-us.apache.org/repos/asf/ignite/blob/1115a794/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
index a5fca5d..a74681e 100644
--- a/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
+++ b/modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/twostep/GridReduceQueryExecutor.java
@@ -618,7 +618,7 @@ public class GridReduceQueryExecutor {
.topologyVersion(topVer)
.pageSize(r.pageSize)
.caches(join(space, extraSpaces))
- .tables(qry.tables())
+ .tables(distributedJoins ? qry.tables() : null)
.partitions(convert(partsMap))
.queries(mapQrys)
.flags(distributedJoins ? GridH2QueryRequest.FLAG_DISTRIBUTED_JOINS : 0),