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

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


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

commit bfab6361f78b2cc04b307924d44fb5ab57685455
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Jan 2 15:11:03 2025 +0800

    branch-2.1: [fix](report) report queue size based on the number of Bes and 
config #46190 (#46243)
    
    Cherry-picked from #46190
    
    Co-authored-by: deardeng <[email protected]>
---
 .../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 853ab1ceb69..6a51ad6caf6 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
@@ -221,11 +221,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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to