Repository: ignite
Updated Branches:
  refs/heads/master 53f903d48 -> 5cc41df7a


IGNITE-8925: SQL: Limit default number of threads for CREATE INDEX to 4. This 
closes #4301.


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

Branch: refs/heads/master
Commit: 5cc41df7ac33ce4664f7db1c1cf8b3cf33d71cc8
Parents: 53f903d
Author: devozerov <voze...@gridgain.com>
Authored: Wed Jul 4 17:11:00 2018 +0300
Committer: devozerov <voze...@gridgain.com>
Committed: Wed Jul 4 17:11:00 2018 +0300

----------------------------------------------------------------------
 .../processors/query/schema/SchemaIndexCacheVisitorImpl.java      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/5cc41df7/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheVisitorImpl.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheVisitorImpl.java
 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheVisitorImpl.java
index b99fb6d..1775c79 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheVisitorImpl.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/internal/processors/query/schema/SchemaIndexCacheVisitorImpl.java
@@ -49,7 +49,8 @@ import static 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDh
 @SuppressWarnings("ForLoopReplaceableByForEach")
 public class SchemaIndexCacheVisitorImpl implements SchemaIndexCacheVisitor {
     /** Default degree of parallelism. */
-    private static final int DFLT_PARALLELISM = Math.max(1, 
Runtime.getRuntime().availableProcessors() / 4);
+    private static final int DFLT_PARALLELISM =
+        Math.min(4, Math.max(1, Runtime.getRuntime().availableProcessors() / 
4));
 
     /** Count of rows, being processed within a single checkpoint lock. */
     private static final int BATCH_SIZE = 1000;

Reply via email to