You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ygerzhedovich (via GitHub)" <gi...@apache.org> on 2024/01/22 15:40:34 UTC
[PR] Ignite 17703 [ignite-3]
ygerzhedovich opened a new pull request, #3076:
URL: https://github.com/apache/ignite-3/pull/3076
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- There is a single JIRA ticket related to the pull request.
\- The web-link to the pull request is attached to the JIRA ticket.
\- The JIRA ticket has the Patch Available state.
\- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
\- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ignite 17703 [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1463293421
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/configuration/local/SqlExecutionLocalConfigurationSchema.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.configuration.local;
+
+import org.apache.ignite.configuration.annotation.Config;
+import org.apache.ignite.configuration.annotation.Value;
+
+/** Local configuration of SQL execution. */
+@Config
+public class SqlExecutionLocalConfigurationSchema {
+ /** Concurrency level for queries execution. */
+ @Value(hasDefault = true)
+ public final int concurrencyLevel = 4;
Review Comment:
At the moment it's a striped pool size and means number of parallel execution of SQL execution tasks. We can say it the javadoc, but in the future we going to amend internal work of execution pool, so I would prefer to keep maximum abstract description for the configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov merged PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ignite 17703 [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#issuecomment-1906091211
@ygerzhedovich plz change PR title into more informative
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1464755952
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/configuration/local/SqlExecutionLocalConfigurationSchema.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.configuration.local;
+
+import org.apache.ignite.configuration.annotation.Config;
+import org.apache.ignite.configuration.annotation.Value;
+
+/** Local configuration of SQL execution. */
+@Config
+public class SqlExecutionLocalConfigurationSchema {
+ /** Concurrency level for queries execution. */
+ @Value(hasDefault = true)
+ public final int concurrencyLevel = 4;
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1464033131
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/configuration/distributed/SqlPlannerDistributedConfigurationSchema.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.configuration.distributed;
+
+import org.apache.ignite.configuration.annotation.Config;
+import org.apache.ignite.configuration.annotation.Value;
+
+/** Distributed configuration of SQL planner. */
+@Config
+public class SqlPlannerDistributedConfigurationSchema {
+ /** Planner timeout, in ms. */
+ @Value(hasDefault = true)
+ public final long maxPlanningTime = 15_000L;
Review Comment:
added
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ignite 17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1463610061
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -324,7 +337,7 @@ public CompletableFuture<ExecutionTarget> forSystemView(ExecutionTargetFactory f
};
var mappingService = new MappingServiceImpl(
- nodeName, executionTargetProvider, CACHE_FACTORY, PLAN_CACHE_SIZE, taskExecutor
+ nodeName, executionTargetProvider, CACHE_FACTORY, planCacheSize, taskExecutor
Review Comment:
it`s out of scope but - why we use planCacheSize as a parameter for MappingServiceImpl ? seems we need an issue here or change it under the current.
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -257,19 +266,23 @@ public SqlQueryProcessor(
public synchronized CompletableFuture<Void> start() {
var nodeName = clusterSrvc.topologyService().localMember().name();
- taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName));
+ taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName, nodeCfg.planner().threadCount().value()));
Review Comment:
but what if we want to add additional configuration param ? i such a case we will need to "materialize" all such params, can we push whole configuration into this method ? And of course - change for appropriate mocks in tests )
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -257,19 +266,23 @@ public SqlQueryProcessor(
public synchronized CompletableFuture<Void> start() {
var nodeName = clusterSrvc.topologyService().localMember().name();
- taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName));
+ taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName, nodeCfg.planner().threadCount().value()));
var mailboxRegistry = registerService(new MailboxRegistryImpl());
SqlClientMetricSource sqlClientMetricSource = new SqlClientMetricSource(openedCursors::size);
metricManager.registerSource(sqlClientMetricSource);
+ int planCacheSize = clusterCfg.planner().estimatedNumberOfQueries().value();
+
var prepareSvc = registerService(PrepareServiceImpl.create(
nodeName,
- PLAN_CACHE_SIZE,
+ planCacheSize,
Review Comment:
this is strange - you "materialize" planCacheSize from clusterCfg and simultaneously push this config into method. Ok it used near but it strange usage and as for me expansion of input parameters is evil
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -229,7 +234,9 @@ public SqlQueryProcessor(
CatalogManager catalogManager,
MetricManager metricManager,
SystemViewManager systemViewManager,
- PlacementDriver placementDriver
+ PlacementDriver placementDriver,
Review Comment:
i know one guy who don`t like huge amount of parameters in constructor )))
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1464039488
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -324,7 +337,7 @@ public CompletableFuture<ExecutionTarget> forSystemView(ExecutionTargetFactory f
};
var mappingService = new MappingServiceImpl(
- nodeName, executionTargetProvider, CACHE_FACTORY, PLAN_CACHE_SIZE, taskExecutor
+ nodeName, executionTargetProvider, CACHE_FACTORY, planCacheSize, taskExecutor
Review Comment:
it's out of scope at all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ignite 17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "zstan (via GitHub)" <gi...@apache.org>.
zstan commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1463543059
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/configuration/distributed/SqlPlannerDistributedConfigurationSchema.java:
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.configuration.distributed;
+
+import org.apache.ignite.configuration.annotation.Config;
+import org.apache.ignite.configuration.annotation.Value;
+
+/** Distributed configuration of SQL planner. */
+@Config
+public class SqlPlannerDistributedConfigurationSchema {
+ /** Planner timeout, in ms. */
+ @Value(hasDefault = true)
+ public final long maxPlanningTime = 15_000L;
Review Comment:
what about the validators for this and near configs ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1464038842
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -257,19 +266,23 @@ public SqlQueryProcessor(
public synchronized CompletableFuture<Void> start() {
var nodeName = clusterSrvc.topologyService().localMember().name();
- taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName));
+ taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName, nodeCfg.planner().threadCount().value()));
Review Comment:
make it when it will be really required
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Ignite 17703 [ignite-3]
Posted by "AMashenkov (via GitHub)" <gi...@apache.org>.
AMashenkov commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1463178218
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/configuration/local/SqlExecutionLocalConfigurationSchema.java:
##########
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.sql.configuration.local;
+
+import org.apache.ignite.configuration.annotation.Config;
+import org.apache.ignite.configuration.annotation.Value;
+
+/** Local configuration of SQL execution. */
+@Config
+public class SqlExecutionLocalConfigurationSchema {
+ /** Concurrency level for queries execution. */
+ @Value(hasDefault = true)
+ public final int concurrencyLevel = 4;
Review Comment:
Is it a pool size? or max number of started queries at a time? or number of threads available for the single query?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-17703: Extract hardcoded constants to configuration in sql-engine module [ignite-3]
Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3076:
URL: https://github.com/apache/ignite-3/pull/3076#discussion_r1464037707
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/SqlQueryProcessor.java:
##########
@@ -257,19 +266,23 @@ public SqlQueryProcessor(
public synchronized CompletableFuture<Void> start() {
var nodeName = clusterSrvc.topologyService().localMember().name();
- taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName));
+ taskExecutor = registerService(new QueryTaskExecutorImpl(nodeName, nodeCfg.planner().threadCount().value()));
var mailboxRegistry = registerService(new MailboxRegistryImpl());
SqlClientMetricSource sqlClientMetricSource = new SqlClientMetricSource(openedCursors::size);
metricManager.registerSource(sqlClientMetricSource);
+ int planCacheSize = clusterCfg.planner().estimatedNumberOfQueries().value();
+
var prepareSvc = registerService(PrepareServiceImpl.create(
nodeName,
- PLAN_CACHE_SIZE,
+ planCacheSize,
Review Comment:
agree
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org