You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by av...@apache.org on 2018/08/03 09:58:33 UTC
[20/50] [abbrv] ignite git commit: IGNITE-9114: SQL: use query time
in retry timeout calculation. This closes #4460.
IGNITE-9114: SQL: use query time in retry timeout calculation. This closes #4460.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f0411759
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f0411759
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f0411759
Branch: refs/heads/ignite-8446
Commit: f0411759b884000dd30e137d0ba70c733651f914
Parents: bcda7a1
Author: devozerov <pp...@gmail.com>
Authored: Tue Jul 31 17:15:49 2018 +0300
Committer: devozerov <pp...@gmail.com>
Committed: Tue Jul 31 17:15:49 2018 +0300
----------------------------------------------------------------------
.../query/h2/twostep/GridReduceQueryExecutor.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/f0411759/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 d778fcc..39b2bbc 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
@@ -114,7 +114,7 @@ import static org.apache.ignite.internal.processors.query.h2.sql.GridSqlQuerySpl
*/
public class GridReduceQueryExecutor {
/** Fail query after 10 seconds of unsuccessful attempts to reserve partitions. */
- public static final long DFLT_RETRY_TIMEOUT = 10_000L;
+ public static final long DFLT_RETRY_TIMEOUT = 30_000L;
/** */
private static final String MERGE_INDEX_UNSORTED = "merge_scan";
@@ -568,7 +568,7 @@ public class GridReduceQueryExecutor {
final boolean isReplicatedOnly = qry.isReplicatedOnly();
- long retryTimeout = retryTimeout();
+ long retryTimeout = retryTimeout(timeoutMillis);
final long startTime = U.currentTimeMillis();
@@ -1756,9 +1756,13 @@ public class GridReduceQueryExecutor {
}
/**
+ * @param qryTimeout Query timeout.
* @return Query retry timeout.
*/
- private static long retryTimeout() {
+ private static long retryTimeout(long qryTimeout) {
+ if (qryTimeout > 0)
+ return qryTimeout;
+
return IgniteSystemProperties.getLong(IGNITE_SQL_RETRY_TIMEOUT, DFLT_RETRY_TIMEOUT);
}