chore(buffer_worker): change default `batch_time` to 0 and improve docs

This commit is contained in:
Thales Macedo Garitezi 2023-03-06 09:56:44 -03:00
parent 9825998207
commit e9d3fc511f
3 changed files with 9 additions and 7 deletions

View File

@ -159,12 +159,12 @@ When disabled the messages are buffered in RAM only."""
batch_time { batch_time {
desc { desc {
en: """Maximum batch waiting interval.""" en: """Maximum waiting interval when accumulating a batch at a low message rates for more efficient resource usage."""
zh: """最大批量请求等待间。""" zh: """在较低消息率情况下尝试累积批量输出时的最大等待间隔,以提高资源的利用率。"""
} }
label { label {
en: """Batch time""" en: """Max Batch Wait Time"""
zh: """批量等待间隔""" zh: """批量等待最大间隔"""
} }
} }

View File

@ -97,8 +97,8 @@
-define(DEFAULT_BATCH_SIZE, 1). -define(DEFAULT_BATCH_SIZE, 1).
%% milliseconds %% milliseconds
-define(DEFAULT_BATCH_TIME, 20). -define(DEFAULT_BATCH_TIME, 0).
-define(DEFAULT_BATCH_TIME_RAW, <<"20ms">>). -define(DEFAULT_BATCH_TIME_RAW, <<"0ms">>).
%% count %% count
-define(DEFAULT_INFLIGHT, 100). -define(DEFAULT_INFLIGHT, 100).

View File

@ -540,7 +540,9 @@ resource_configs() ->
<<"query_mode">> => <<"sync">>, <<"query_mode">> => <<"sync">>,
<<"worker_pool_size">> => <<"1">>, <<"worker_pool_size">> => <<"1">>,
<<"batch_size">> => integer_to_binary(?BATCH_SIZE), <<"batch_size">> => integer_to_binary(?BATCH_SIZE),
<<"start_timeout">> => <<"15s">> <<"start_timeout">> => <<"15s">>,
<<"batch_time">> => <<"4s">>,
<<"request_timeout">> => <<"30s">>
} }
}. }.