chore(ds): Rebase configuration
This commit is contained in:
parent
f5c71e8068
commit
4d47490734
|
@ -54,12 +54,14 @@ is_persistence_enabled() ->
|
|||
storage_backend() ->
|
||||
storage_backend(emqx_config:get([session_persistence, storage])).
|
||||
|
||||
storage_backend(#{builtin := #{enable := true}}) ->
|
||||
storage_backend(#{
|
||||
builtin := #{enable := true, n_shards := NShards, replication_factor := ReplicationFactor}
|
||||
}) ->
|
||||
#{
|
||||
backend => builtin,
|
||||
storage => {emqx_ds_storage_bitfield_lts, #{}},
|
||||
n_shards => 16,
|
||||
replication_factor => 3
|
||||
n_shards => NShards,
|
||||
replication_factor => ReplicationFactor
|
||||
}.
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
|
|
|
@ -341,22 +341,6 @@ fields("persistent_session_store") ->
|
|||
importance => ?IMPORTANCE_HIDDEN
|
||||
}
|
||||
)},
|
||||
{"n_shards",
|
||||
sc(
|
||||
pos_integer(),
|
||||
#{
|
||||
default => 16,
|
||||
importance => ?IMPORTANCE_HIDDEN
|
||||
}
|
||||
)},
|
||||
{"replication_factor",
|
||||
sc(
|
||||
pos_integer(),
|
||||
#{
|
||||
default => 3,
|
||||
importance => ?IMPORTANCE_HIDDEN
|
||||
}
|
||||
)},
|
||||
{"on_disc",
|
||||
sc(
|
||||
boolean(),
|
||||
|
@ -1807,6 +1791,22 @@ fields("session_storage_backend_builtin") ->
|
|||
desc => ?DESC(session_storage_backend_enable),
|
||||
default => true
|
||||
}
|
||||
)},
|
||||
{"n_shards",
|
||||
sc(
|
||||
pos_integer(),
|
||||
#{
|
||||
desc => ?DESC(session_builtin_n_shards),
|
||||
default => 16
|
||||
}
|
||||
)},
|
||||
{"replication_factor",
|
||||
sc(
|
||||
pos_integer(),
|
||||
#{
|
||||
default => 3,
|
||||
importance => ?IMPORTANCE_HIDDEN
|
||||
}
|
||||
)}
|
||||
].
|
||||
|
||||
|
|
|
@ -1565,6 +1565,9 @@ session_persistence_storage.desc:
|
|||
session_storage_backend_enable.desc:
|
||||
"""Enable this backend."""
|
||||
|
||||
session_builtin_n_shards.desc:
|
||||
"""Number of shards used for storing the messages."""
|
||||
|
||||
session_storage_backend_builtin.desc:
|
||||
"""Builtin session storage backend utilizing embedded RocksDB key-value store."""
|
||||
|
||||
|
|
Loading…
Reference in New Issue