diff --git a/.github/PULL_REQUEST_TEMPLATE/v5.md b/.github/PULL_REQUEST_TEMPLATE/v5.md index d4104ca5d..7952c1371 100644 --- a/.github/PULL_REQUEST_TEMPLATE/v5.md +++ b/.github/PULL_REQUEST_TEMPLATE/v5.md @@ -5,7 +5,7 @@ Please convert it to a draft if any of the following conditions are not met. Rev - [ ] Added tests for the changes - [ ] Changed lines covered in coverage report -- [ ] Change log has been added to `changes//(feat|fix)-.en.md` and `.zh.md` files +- [ ] Change log has been added to `changes/{ce,ee}/(feat|perf|fix)-.en.md` and `.zh.md` files - [ ] For internal contributor: there is a jira ticket to track this change - [ ] If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow up - [ ] Schema changes are backward compatible diff --git a/changes/ee/fix-10007.en.md b/changes/ee/fix-10007.en.md new file mode 100644 index 000000000..1adab8e9b --- /dev/null +++ b/changes/ee/fix-10007.en.md @@ -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. diff --git a/changes/ee/fix-10007.zh.md b/changes/ee/fix-10007.zh.md new file mode 100644 index 000000000..0c08f20d0 --- /dev/null +++ b/changes/ee/fix-10007.zh.md @@ -0,0 +1,3 @@ +Kafka 桥接的配置参数 `memory_overload_protection` 默认值从 `true` 改成了 `false`。 +尽管内存过载后消息被丢弃会产生日志和计数,如果没有基于这些日志或计数的告警,系统管理员可能无法及时发现消息被丢弃。 +当前更好的选择是:让管理员显式的配置该项,迫使他们理解这个配置的好处以及风险。 diff --git a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf index e72da2323..c41b95c3a 100644 --- a/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf +++ b/lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf @@ -439,7 +439,7 @@ emqx_ee_bridge_kafka { } buffer_memory_overload_protection { desc { - en: "Applicable when buffer mode is set to memory or hybrid.\n" + en: "Applicable when buffer mode is set to memory\n" "EMQX will drop old buffered messages under high memory pressure. " "The high memory threshold is defined in config sysmon.os.sysmem_high_watermark. " "NOTE: This config only works on Linux." diff --git a/lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_kafka.erl b/lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_kafka.erl index 3983b235c..c345f6c74 100644 --- a/lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_kafka.erl +++ b/lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_kafka.erl @@ -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) })} ].