Sfoglia il codice sorgente

fix(ds): add missing schema descriptions + correct spelling

Andrew Mayorov 1 anno fa
parent
commit
e914c577bd
2 ha cambiato i file con 15 aggiunte e 5 eliminazioni
  1. 3 2
      apps/emqx/src/emqx_ds_schema.erl
  2. 12 3
      rel/i18n/emqx_ds_schema.hocon

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

@@ -163,7 +163,8 @@ fields(builtin_raft) ->
                 pos_integer(),
                 #{
                     default => 3,
-                    importance => ?IMPORTANCE_MEDIUM
+                    importance => ?IMPORTANCE_MEDIUM,
+                    desc => ?DESC(builtin_raft_replication_factor)
                 }
             )},
         {n_sites,
@@ -172,7 +173,7 @@ fields(builtin_raft) ->
                 #{
                     default => 1,
                     importance => ?IMPORTANCE_LOW,
-                    desc => ?DESC(builtin_n_sites)
+                    desc => ?DESC(builtin_raft_n_sites)
                 }
             )},
         %% TODO: Elaborate.

+ 12 - 3
rel/i18n/emqx_ds_schema.hocon

@@ -36,11 +36,20 @@ 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:
+builtin_raft_replication_factor.label: "Replication factor"
+builtin_raft_replication_factor.desc:
+  """~
+  Number of identical replicas each shard should have.
+  Increasing this number improves durability and availability at the expense of greater resource consumption.
+  Quorum of replicas is needed to be healthy for the replication to work, hence an odd number of replicas is a good pick in general.
+  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_raft_n_sites.label: "Initial number of sites"
+builtin_raft_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.
+  In this context, sites are EMQX nodes with 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.~"""