Merge pull request #9625 from zmstone/1228-only-high-load-detect-in-linux
fix(kafka): Memory OLP is only applicable in linux systems
This commit is contained in:
commit
4e61e0602d
|
@ -439,9 +439,11 @@ emqx_ee_bridge_kafka {
|
|||
en: "Applicable when buffer mode is set to <code>memory</code> or <code>hybrid</code>.\n"
|
||||
"EMQX will drop old cached 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."
|
||||
zh: "缓存模式是 <code>memory</code> 或 <code>hybrid</code> 时适用。"
|
||||
"当系统处于高内存压力时,从队列中丢弃旧的消息以减缓内存增长。"
|
||||
"内存压力值由配置项 <code>sysmon.os.sysmem_high_watermark</code> 决定。"
|
||||
"注意,该配置仅在 Linux 系统中有效。"
|
||||
}
|
||||
label {
|
||||
en: "Memory Overload Protection"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{application, emqx_ee_bridge, [
|
||||
{description, "EMQX Enterprise data bridges"},
|
||||
{vsn, "0.1.1"},
|
||||
{vsn, "0.1.2"},
|
||||
{registered, []},
|
||||
{applications, [
|
||||
kernel,
|
||||
|
|
|
@ -236,10 +236,14 @@ producers_config(BridgeName, ClientId, Input) ->
|
|||
mode := BufferMode,
|
||||
per_partition_limit := PerPartitionLimit,
|
||||
segment_bytes := SegmentBytes,
|
||||
memory_overload_protection := MemOLP
|
||||
memory_overload_protection := MemOLP0
|
||||
}
|
||||
} = Input,
|
||||
|
||||
MemOLP =
|
||||
case os:type() of
|
||||
{unix, linux} -> MemOLP0;
|
||||
_ -> false
|
||||
end,
|
||||
{OffloadMode, ReplayqDir} =
|
||||
case BufferMode of
|
||||
memory -> {false, false};
|
||||
|
|
Loading…
Reference in New Issue