Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off kafka bridge default mem olp #10007

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/v5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<version>/(feat|fix)-<PR-id>.en.md` and `.zh.md` files
- [ ] Change log has been added to `changes/{ce,ee}/(feat|perf|fix)-<PR-id>.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
5 changes: 5 additions & 0 deletions changes/ee/fix-10007.en.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions changes/ee/fix-10007.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Kafka 桥接的配置参数 `memory_overload_protection` 默认值从 `true` 改成了 `false`。
尽管内存过载后消息被丢弃会产生日志和计数,如果没有基于这些日志或计数的告警,系统管理员可能无法及时发现消息被丢弃。
当前更好的选择是:让管理员显式的配置该项,迫使他们理解这个配置的好处以及风险。
2 changes: 1 addition & 1 deletion lib-ee/emqx_ee_bridge/i18n/emqx_ee_bridge_kafka.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
3 changes: 1 addition & 2 deletions lib-ee/emqx_ee_bridge/src/emqx_ee_bridge_kafka.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})}
].
Expand Down