This is an automated email from the ASF dual-hosted git repository.

gavinchou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new e84ca325955 [fix](report) report queue size based on the number of Bes 
and config (#46190)
e84ca325955 is described below

commit e84ca325955171508038383e1daf1d67c521cd9a
Author: deardeng <deng...@selectdb.com>
AuthorDate: Wed Jan 1 23:44:12 2025 +0800

    [fix](report) report queue size based on the number of Bes and config 
(#46190)
    
    
    A large cluster has many BE nodes, and the report occasionally
    encounters a "queue full" error. The report queue size will be modified
    based on the number of BE instances.
---
 .../src/main/java/org/apache/doris/master/ReportHandler.java      | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java 
b/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
index 08e4844863a..cae089f38dd 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
@@ -232,11 +232,13 @@ public class ReportHandler extends Daemon {
 
     private void putToQueue(ReportTask reportTask) throws Exception {
         int currentSize = reportQueue.size();
-        if (currentSize > Config.report_queue_size) {
-            LOG.warn("the report queue size exceeds the limit: {}. current: 
{}", Config.report_queue_size, currentSize);
+        int maxReportQueueSize = Math.max(Config.report_queue_size,
+                10 * Env.getCurrentSystemInfo().getAllBackendIds().size());
+        if (currentSize > maxReportQueueSize) {
+            LOG.warn("the report queue size exceeds the limit: {}. current: 
{}", maxReportQueueSize, currentSize);
             throw new Exception(
                     "the report queue size exceeds the limit: "
-                            + Config.report_queue_size + ". current: " + 
currentSize);
+                            + maxReportQueueSize + ". current: " + 
currentSize);
         }
 
         BackendReportType backendReportType = new 
BackendReportType(reportTask.beId, reportTask.reportType);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to