Просмотр исходного кода

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

Andrew Mayorov 1 год назад
Родитель
Сommit
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)
                 }
             )},
-        %% TODO: Minimum number of sites that will be responsible for the shards
+        %% TODO: Deprecate once cluster management and rebalancing is implemented.
         {"n_sites",
             sc(
                 pos_integer(),
                 #{
-                    default => 1
+                    default => 1,
+                    importance => ?IMPORTANCE_HIDDEN,
+                    desc => ?DESC(builtin_n_sites)
                 }
             )},
         {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.
   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.desc:
   """~