Skip to content

Commit

Permalink
[improve](report) split agent batch tasks automaticlly (apache#43257)
Browse files Browse the repository at this point in the history
to avoid the binary message size exceeds the thrift max message size
limitation
  • Loading branch information
w41ter committed Nov 6, 2024
1 parent 97a5b0d commit d73a295
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1119,6 +1119,14 @@ public class Config extends ConfigBase {
@ConfField(mutable = true, masterOnly = true)
public static int report_queue_size = 100;

// if the number of report task in FE exceed max_report_task_num_per_rpc, then split it to multiple rpc
@ConfField(mutable = true, masterOnly = true, description = {
"重新发送 agent task 时,单次 RPC 分配给每个be的任务最大个数,默认值为10000个。",
"The maximum number of batched tasks per RPC assigned to each BE when resending agent tasks, "
+ "the default value is 10000."
})
public static int report_resend_batch_task_num_per_rpc = 10000;

/**
* If set to true, metric collector will be run as a daemon timer to collect metrics at fix interval
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ private static void taskReport(long backendId, Map<TTaskType, Set<Long>> running

List<AgentTask> diffTasks = AgentTaskQueue.getDiffTasks(backendId, runningTasks);

AgentBatchTask batchTask = new AgentBatchTask();
AgentBatchTask batchTask = new AgentBatchTask(Config.report_resend_batch_task_num_per_rpc);
long taskReportTime = System.currentTimeMillis();
for (AgentTask task : diffTasks) {
// these tasks no need to do diff
Expand Down

0 comments on commit d73a295

Please sign in to comment.