浏览代码

docs(dsrepl): describe briefly what `n_sites` is for

Andrew Mayorov 2 年之前
父节点
当前提交
a8baff61ec
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 4 2
      apps/emqx/src/emqx_ds_schema.erl
  2. 9 0
      rel/i18n/emqx_ds_schema.hocon

+ 4 - 2
apps/emqx/src/emqx_ds_schema.erl

@@ -131,12 +131,14 @@ fields(builtin) ->
                     desc => ?DESC(builtin_n_shards)
                     desc => ?DESC(builtin_n_shards)
                 }
                 }
             )},
             )},
-        %% TODO: Minimum number of sites that will be responsible for the shards
+        %% TODO: Deprecate once cluster management and rebalancing is implemented.
         {"n_sites",
         {"n_sites",
             sc(
             sc(
                 pos_integer(),
                 pos_integer(),
                 #{
                 #{
-                    default => 1
+                    default => 1,
+                    importance => ?IMPORTANCE_HIDDEN,
+                    desc => ?DESC(builtin_n_sites)
                 }
                 }
             )},
             )},
         {replication_factor,
         {replication_factor,

+ 9 - 0
rel/i18n/emqx_ds_schema.hocon

@@ -30,6 +30,15 @@ builtin_n_shards.desc:
   Please note that it takes effect only during the initialization of the durable storage database.
   Please note that it takes effect only during the initialization of the durable storage database.
   Changing this configuration parameter after the database has been already created won't take any effect.~"""
   Changing this configuration parameter after the database has been already created won't take any effect.~"""
 
 
+builtin_n_sites.label: "Initial number of sites"
+builtin_n_sites.desc:
+  """~
+  Number of storage sites that need to share responsibility over the set of storage shards.
+  In this context, sites are essentially EMQX nodes that have message durability enabled.
+  Please note that it takes effect only during the initialization of the durable storage database.
+  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.label: "Local write buffer"
 builtin_local_write_buffer.desc:
 builtin_local_write_buffer.desc:
   """~
   """~