[ 
https://issues.apache.org/jira/browse/KYLIN-4653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167852#comment-17167852
 ] 

ASF GitHub Bot commented on KYLIN-4653:
---------------------------------------

hit-lacus commented on a change in pull request #1334:
URL: https://github.com/apache/kylin/pull/1334#discussion_r462945077



##########
File path: 
core-metrics/src/main/java/org/apache/kylin/metrics/lib/impl/BlockingReservoir.java
##########
@@ -60,14 +60,15 @@ public BlockingReservoir(int minReportSize, int 
maxReportSize) {
     }
 
     public BlockingReservoir(int minReportSize, int maxReportSize, int 
maxReportTime) {
-        this(minReportSize, maxReportSize, maxReportSize, MAX_QUEUE_SIZE);
+        this(minReportSize, maxReportSize, maxReportTime, MAX_QUEUE_SIZE);
     }
 
     public BlockingReservoir(int minReportSize, int maxReportSize, int 
maxReportTime, int maxQueueSize) {
         Preconditions.checkArgument(minReportSize > 0, "minReportSize should 
be larger than 0");
         Preconditions.checkArgument(maxReportSize >= minReportSize,
                 "maxReportSize should not be less than minBatchSize");
         Preconditions.checkArgument(maxReportTime > 0, "maxReportTime should 
be larger than 0");
+        Preconditions.checkArgument(maxQueueSize > 0, "maxQueueSize should be 
larger than 0");

Review comment:
       Good advice!




----------------------------------------------------------------
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.

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


> Make the capacity for the LinkedBlockingQueue of BlockingReservoir 
> configurable
> -------------------------------------------------------------------------------
>
>                 Key: KYLIN-4653
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4653
>             Project: Kylin
>          Issue Type: Improvement
>            Reporter: Zhong Yanghong
>            Assignee: Zhong Yanghong
>            Priority: Major
>             Fix For: v3.1.1
>
>
> Currently the blocking queue capacity is 50K. It is too small, which easily 
> goes into being blocked and slows down queries.
> It's better to make this value configurable and enlarge the default value.
> For real usage, I strongly recommend to use unbounded LinkedBlockingQueue, 
> which is supposed not to block queries due to report query metrics.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to