You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/14 22:58:52 UTC

[GitHub] [druid] somu-imply opened a new pull request #12070: Thread pool for broker

somu-imply opened a new pull request #12070:
URL: https://github.com/apache/druid/pull/12070


   The intermediate results pool for broker cannot be converted to a dummy pool and it is being used by group by queries and also by group by on lookups in the broker. We have introduced a separate BrokerProcessingModule for broker which initializes the intermediate results pool by default to 0. This decouples the pool usage by the broker for the intermediate results pool from the DruidProcessingModule which is used by historicals as well.
   
   The checkin is verified on a local druid cluster and integration tests pass locally
   
   This PR has:
   - [ x] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ x] added documentation for new or modified features or behaviors.
   - [ x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ x] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s merged pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
suneet-s merged pull request #12070:
URL: https://github.com/apache/druid/pull/12070


   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s edited a comment on pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
suneet-s edited a comment on pull request #12070:
URL: https://github.com/apache/druid/pull/12070#issuecomment-999070182


   > Travis will fail due to lack of coverage on openJDK11 and openJDK15 server module tests. This is expected as there is a piece of code in `BrokerProcessingModule` that invokes `JvmUtils.getRuntimeInfo().getDirectMemorySizeBytes();` and JDK 9 and above do not support checking for direct memory size. The server module tests involving JDK8 passes on Travis
   
   +1 for overruling lack of test coverage in this case. I will merge once the rest of the travis jobs pass


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] clintropolis commented on a change in pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
clintropolis commented on a change in pull request #12070:
URL: https://github.com/apache/druid/pull/12070#discussion_r769167631



##########
File path: server/src/main/java/org/apache/druid/guice/BrokerProcessingModule.java
##########
@@ -0,0 +1,185 @@
+/*
+ * 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.druid.guice;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import com.google.inject.Binder;
+import com.google.inject.Module;
+import com.google.inject.Provides;
+import com.google.inject.ProvisionException;
+import org.apache.druid.client.cache.BackgroundCachePopulator;
+import org.apache.druid.client.cache.CacheConfig;
+import org.apache.druid.client.cache.CachePopulator;
+import org.apache.druid.client.cache.CachePopulatorStats;
+import org.apache.druid.client.cache.ForegroundCachePopulator;
+import org.apache.druid.collections.BlockingPool;
+import org.apache.druid.collections.DefaultBlockingPool;
+import org.apache.druid.collections.NonBlockingPool;
+import org.apache.druid.collections.StupidPool;
+import org.apache.druid.guice.annotations.Global;
+import org.apache.druid.guice.annotations.Merging;
+import org.apache.druid.guice.annotations.Smile;
+import org.apache.druid.java.util.common.StringUtils;
+import org.apache.druid.java.util.common.concurrent.Execs;
+import org.apache.druid.java.util.common.concurrent.ExecutorServiceConfig;
+import org.apache.druid.java.util.common.logger.Logger;
+import org.apache.druid.offheap.OffheapBufferGenerator;
+import org.apache.druid.query.DruidProcessingConfig;
+import org.apache.druid.query.ExecutorServiceMonitor;
+import org.apache.druid.query.ForwardingQueryProcessingPool;
+import org.apache.druid.query.QueryProcessingPool;
+import org.apache.druid.server.metrics.MetricsModule;
+import org.apache.druid.utils.JvmUtils;
+
+import java.nio.ByteBuffer;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ForkJoinPool;
+
+/**
+ * This module is used to fulfill dependency injection of query processing and caching resources: buffer pools and
+ * thread pools on Broker. Broker does not need to be allocated an intermediate results pool.
+ * This is separated from DruidProcessingModule to separate the needs of the broker from the historicals
+ */
+
+public class BrokerProcessingModule implements Module

Review comment:
       since some of these methods are exact copies of `DruidProcessingModule`, it might make sense to share some base structure, or for this module to extend `DruidProcessingModule`




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] somu-imply edited a comment on pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
somu-imply edited a comment on pull request #12070:
URL: https://github.com/apache/druid/pull/12070#issuecomment-999050441


   Travis will fail due to lack of coverage on openJDK11 and openJDK15 server module tests. This is expected as there is a piece of code in `BrokerProcessingModule` that invokes `JvmUtils.getRuntimeInfo().getDirectMemorySizeBytes();` and JDK 9 and above do not support checking for direct memory size. The server module tests involving JDK8 passes on Travis


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] somu-imply commented on pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
somu-imply commented on pull request #12070:
URL: https://github.com/apache/druid/pull/12070#issuecomment-999050441


   Travis will fail due to lack of coverage on openJDK11 and openJDK15 server module tests. This is expected as there is a piece of code in `BrokerProcessingModule` that invokes J`vmUtils.getRuntimeInfo().getDirectMemorySizeBytes();` and JDK 9 and above do not support checking for direct memory size. The server module tests involving JDK8 passes on Travis


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
suneet-s commented on pull request #12070:
URL: https://github.com/apache/druid/pull/12070#issuecomment-999070182


   > Travis will fail due to lack of coverage on openJDK11 and openJDK15 server module tests. This is expected as there is a piece of code in `BrokerProcessingModule` that invokes `JvmUtils.getRuntimeInfo().getDirectMemorySizeBytes();` and JDK 9 and above do not support checking for direct memory size. The server module tests involving JDK8 passes on Travis
   
   +1 for overruling lack on test coverage in this case. I will merge once the rest of the travis jobs pass


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] suneet-s commented on pull request #12070: Removing unused processing threadpool on broker

Posted by GitBox <gi...@apache.org>.
suneet-s commented on pull request #12070:
URL: https://github.com/apache/druid/pull/12070#issuecomment-999095021


   Overruling Travis only failures are for lack of test coverage as explained in a previous comment and ITBroadcastJoinQueryTest which is aknown flaky test with an attempted fix in #11970 


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org