fix(kafka): change default value for memory_overload_protection to false

This commit is contained in:
Zaiming (Stone) Shi 2023-02-20 18:55:24 +01:00
parent 4cc92c0368
commit ada68e12e6
4 changed files with 10 additions and 3 deletions

View File

@ -0,0 +1,5 @@
Change Kafka bridge's config `memory_overload_protection` default value from `true` to `false`.
EMQX logs cases when messages get dropped due to overload protection, and this is also reflected in counters.
However, since there is by default no alerting based on the logs and counters,
setting it to `true` may cause messages being dropped without noticing.
At the time being, the better option is to let sysadmin set it explicitly so they are fully aware of the benefits and risks.

View File

@ -0,0 +1,3 @@
Kafka 桥接的配置参数 `memory_overload_protection` 默认值从 `true` 改成了 `false`
尽管内存过载后消息被丢弃会产生日志和计数,如果没有基于这些日志或计数的告警,系统管理员可能无法及时发现消息被丢弃。
当前更好的选择是:让管理员显式的配置该项,迫使他们理解这个配置的好处以及风险。

View File

@ -439,7 +439,7 @@ emqx_ee_bridge_kafka {
}
buffer_memory_overload_protection {
desc {
en: "Applicable when buffer mode is set to <code>memory</code> or <code>hybrid</code>.\n"
en: "Applicable when buffer mode is set to <code>memory</code>\n"
"EMQX will drop old buffered messages under high memory pressure. "
"The high memory threshold is defined in config <code>sysmon.os.sysmem_high_watermark</code>. "
"NOTE: This config only works on Linux."

View File

@ -238,8 +238,7 @@ fields(producer_buffer) ->
)},
{memory_overload_protection,
mk(boolean(), #{
%% different from 4.x
default => true,
default => false,
desc => ?DESC(buffer_memory_overload_protection)
})}
].