From abe41de19b7ba3b1b4ae7fcd79ba42c25be2a065 Mon Sep 17 00:00:00 2001 From: ieQu1 <99872536+ieQu1@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:46:36 +0200 Subject: [PATCH] refactor(ds_schema): builtin_local_buffer -> builtin_buffer --- apps/emqx/src/emqx_ds_schema.erl | 14 +++++++------- rel/i18n/emqx_ds_schema.hocon | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apps/emqx/src/emqx_ds_schema.erl b/apps/emqx/src/emqx_ds_schema.erl index 2fd4752bd..6f766c45e 100644 --- a/apps/emqx/src/emqx_ds_schema.erl +++ b/apps/emqx/src/emqx_ds_schema.erl @@ -160,10 +160,10 @@ fields(builtin) -> )}, {local_write_buffer, sc( - ref(builtin_local_write_buffer), + ref(builtin_write_buffer), #{ importance => ?IMPORTANCE_HIDDEN, - desc => ?DESC(builtin_local_write_buffer) + desc => ?DESC(builtin_write_buffer) } )}, {layout, @@ -179,7 +179,7 @@ fields(builtin) -> } )} ]; -fields(builtin_local_write_buffer) -> +fields(builtin_write_buffer) -> [ {max_items, sc( @@ -188,7 +188,7 @@ fields(builtin_local_write_buffer) -> default => 1000, mapping => "emqx_durable_storage.egress_batch_size", importance => ?IMPORTANCE_HIDDEN, - desc => ?DESC(builtin_local_write_buffer_max_items) + desc => ?DESC(builtin_write_buffer_max_items) } )}, {flush_interval, @@ -198,7 +198,7 @@ fields(builtin_local_write_buffer) -> default => 100, mapping => "emqx_durable_storage.egress_flush_interval", importance => ?IMPORTANCE_HIDDEN, - desc => ?DESC(builtin_local_write_buffer_flush_interval) + desc => ?DESC(builtin_write_buffer_flush_interval) } )} ]; @@ -254,8 +254,8 @@ fields(layout_builtin_reference) -> desc(builtin) -> ?DESC(builtin); -desc(builtin_local_write_buffer) -> - ?DESC(builtin_local_write_buffer); +desc(builtin_write_buffer) -> + ?DESC(builtin_write_buffer); desc(layout_builtin_wildcard_optimized) -> ?DESC(layout_builtin_wildcard_optimized); desc(layout_builtin_reference) -> diff --git a/rel/i18n/emqx_ds_schema.hocon b/rel/i18n/emqx_ds_schema.hocon index 65b76b6fa..7875295e6 100644 --- a/rel/i18n/emqx_ds_schema.hocon +++ b/rel/i18n/emqx_ds_schema.hocon @@ -39,21 +39,21 @@ builtin_n_sites.desc: During this phase at least that many sites should come online to distribute shards between them, otherwise message storage will be unavailable until then. After the initialization is complete, sites may be offline, which will affect availability depending on the number of offline sites and replication factor.~""" -builtin_local_write_buffer.label: "Local write buffer" -builtin_local_write_buffer.desc: +builtin_write_buffer.label: "Local write buffer" +builtin_write_buffer.desc: """~ Configuration related to the buffering of messages sent from the local node to the shard leader. EMQX accumulates PUBLISH messages from the local clients in a write buffer before committing them to the durable storage. This helps to hide network latency between EMQX nodes and improves write throughput.~""" -builtin_local_write_buffer_max_items.label: "Max items" -builtin_local_write_buffer_max_items.desc: +builtin_write_buffer_max_items.label: "Max items" +builtin_write_buffer_max_items.desc: """~ This configuration parameter defines maximum number of messages stored in the local write buffer.~""" -builtin_local_write_buffer_flush_interval.label: "Flush interval" -builtin_local_write_buffer_flush_interval.desc: +builtin_write_buffer_flush_interval.label: "Flush interval" +builtin_write_buffer_flush_interval.desc: """~ Maximum linger time for the buffered messages. Local write buffer will be flushed _at least_ as often as `flush_interval`.