Skip to content

Commit

Permalink
chore(sessds): Remove deprecated schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ieQu1 committed Feb 22, 2024
1 parent 9893cc7 commit f754cdf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 198 deletions.
115 changes: 0 additions & 115 deletions apps/emqx/src/emqx_schema.erl
Original file line number Diff line number Diff line change
Expand Up @@ -293,16 +293,6 @@ roots(low) ->
converter => fun flapping_detect_converter/2
}
)},
{"persistent_session_store",
sc(
ref("persistent_session_store"),
#{
%% NOTE
%% Due to some quirks in interaction between `emqx_config` and
%% `hocon_tconf`, schema roots cannot currently be deprecated.
importance => ?IMPORTANCE_HIDDEN
}
)},
{"session_persistence",
sc(
ref("session_persistence"),
Expand All @@ -322,111 +312,6 @@ roots(low) ->
)}
].

fields("persistent_session_store") ->
Deprecated = #{deprecated => {since, "5.4.0"}},
[
{"enabled",
sc(
boolean(),
Deprecated#{
default => false,
%% TODO(5.2): change field name to 'enable' and keep 'enabled' as an alias
aliases => [enable],
desc => ?DESC(persistent_session_store_enabled)
}
)},
{"ds",
sc(
boolean(),
Deprecated#{
default => false,
importance => ?IMPORTANCE_HIDDEN
}
)},
{"on_disc",
sc(
boolean(),
Deprecated#{
default => true,
desc => ?DESC(persistent_store_on_disc)
}
)},
{"ram_cache",
sc(
boolean(),
Deprecated#{
default => false,
desc => ?DESC(persistent_store_ram_cache)
}
)},
{"backend",
sc(
hoconsc:union([ref("persistent_session_builtin")]),
Deprecated#{
default => #{
<<"type">> => <<"builtin">>,
<<"session">> =>
#{<<"ram_cache">> => true},
<<"session_messages">> =>
#{<<"ram_cache">> => true},
<<"messages">> =>
#{<<"ram_cache">> => false}
},
desc => ?DESC(persistent_session_store_backend)
}
)},
{"max_retain_undelivered",
sc(
duration(),
Deprecated#{
default => <<"1h">>,
desc => ?DESC(persistent_session_store_max_retain_undelivered)
}
)},
{"message_gc_interval",
sc(
duration(),
Deprecated#{
default => <<"1h">>,
desc => ?DESC(persistent_session_store_message_gc_interval)
}
)},
{"session_message_gc_interval",
sc(
duration(),
Deprecated#{
default => <<"1m">>,
desc => ?DESC(persistent_session_store_session_message_gc_interval)
}
)}
];
fields("persistent_table_mria_opts") ->
[
{"ram_cache",
sc(
boolean(),
#{
default => true,
desc => ?DESC(persistent_store_ram_cache)
}
)}
];
fields("persistent_session_builtin") ->
[
{"type", sc(hoconsc:enum([builtin]), #{default => builtin, desc => ""})},
{"session",
sc(ref("persistent_table_mria_opts"), #{
desc => ?DESC(persistent_session_builtin_session_table)
})},
{"session_messages",
sc(ref("persistent_table_mria_opts"), #{
desc => ?DESC(persistent_session_builtin_sess_msg_table)
})},
{"messages",
sc(ref("persistent_table_mria_opts"), #{
desc => ?DESC(persistent_session_builtin_messages_table)
})}
];
fields("stats") ->
[
{"enable",
Expand Down
83 changes: 0 additions & 83 deletions rel/i18n/emqx_schema.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ mqtt_max_subscriptions.desc:
mqtt_max_subscriptions.label:
"""Max Subscriptions"""

persistent_session_builtin_messages_table.desc:
"""Performance tuning options for built-in messages table."""

persistent_session_builtin_messages_table.label:
"""Persistent messages"""

sysmon_os_cpu_low_watermark.desc:
"""The threshold, as percentage of system CPU load,
for how much system cpu can be used before the corresponding alarm is cleared. Disabled on Windows platform"""
Expand Down Expand Up @@ -370,12 +364,6 @@ sysmon_top_num_items.desc:
sysmon_top_num_items.label:
"""Top num items"""

persistent_session_builtin_session_table.desc:
"""Performance tuning options for built-in session table."""

persistent_session_builtin_session_table.label:
"""Persistent session"""

mqtt_upgrade_qos.desc:
"""Force upgrade of QoS level according to subscription."""

Expand Down Expand Up @@ -518,14 +506,6 @@ mqtt_max_inflight.desc:
mqtt_max_inflight.label:
"""Max Inflight"""

persistent_session_store_enabled.desc:
"""Use the database to store information about persistent sessions.
This makes it possible to migrate a client connection to another
cluster node if a node is stopped."""

persistent_session_store_enabled.label:
"""Enable persistent session store"""

fields_deflate_opts_level.desc:
"""Compression level."""

Expand All @@ -544,14 +524,6 @@ fields_mqtt_quic_listener_load_balancing_mode.desc:
fields_mqtt_quic_listener_load_balancing_mode.label:
"""Load balancing mode"""

persistent_session_store_session_message_gc_interval.desc:
"""The starting interval for garbage collection of transient data for
persistent session messages. This does not affect the lifetime length
of persistent session messages."""

persistent_session_store_session_message_gc_interval.label:
"""Session message GC interval"""

server_ssl_opts_schema_ocsp_refresh_http_timeout.desc:
"""The timeout for the HTTP request when checking OCSP responses."""

Expand Down Expand Up @@ -612,12 +584,6 @@ broker_session_locking_strategy.desc:
- `quorum`: select some nodes to lock the session
- `all`: lock the session on all the nodes in the cluster"""

persistent_store_ram_cache.desc:
"""Maintain a copy of the data in RAM for faster access."""

persistent_store_ram_cache.label:
"""RAM cache"""

fields_mqtt_quic_listener_stream_recv_window_default.desc:
"""Initial stream receive window size. Default: 32678"""

Expand Down Expand Up @@ -834,14 +800,6 @@ force_shutdown_max_heap_size.desc:
force_shutdown_max_heap_size.label:
"""Total heap size"""

persistent_store_on_disc.desc:
"""Save information about the persistent sessions on disc.
If this option is enabled, persistent sessions will survive full restart of the cluster.
Otherwise, all the data will be stored in RAM, and it will be lost when all the nodes in the cluster are stopped."""

persistent_store_on_disc.label:
"""Persist on disc"""

mqtt_ignore_loop_deliver.desc:
"""Whether the messages sent by the MQTT v3.1.1/v3.1.0 client will be looped back to the publisher itself, similar to <code>No Local</code> in MQTT 5.0."""

Expand Down Expand Up @@ -1051,13 +1009,6 @@ base_listener_limiter.desc:
base_listener_limiter.label:
"""Type of the rate limit."""

persistent_session_store_backend.desc:
"""Database management system used to store information about persistent sessions and messages.
- `builtin`: Use the embedded database (mria)"""

persistent_session_store_backend.label:
"""Backend"""

alarm_validity_period.desc:
"""Retention time of deactivated alarms. Alarms are not deleted immediately
when deactivated, but after the retention time."""
Expand Down Expand Up @@ -1095,14 +1046,6 @@ To disable this feature, input <code>""</code> in the text box below. Only appli
mqtt_response_information.label:
"""Response Information"""

persistent_session_store_max_retain_undelivered.desc:
"""The time messages that was not delivered to a persistent session
is stored before being garbage collected if the node the previous
session was handled on restarts of is stopped."""

persistent_session_store_max_retain_undelivered.label:
"""Max retain undelivered"""

fields_mqtt_quic_listener_migration_enabled.desc:
"""Enable clients to migrate IP addresses and tuples. Requires a cooperative load-balancer, or no load-balancer. Default: 1 (Enabled)"""

Expand Down Expand Up @@ -1199,12 +1142,6 @@ until the subscriber disconnects.
- `local`: send to a random local subscriber. If local
subscriber was not found, send to a random subscriber cluster-wide"""

persistent_session_builtin_sess_msg_table.desc:
"""Performance tuning options for built-in session messages table."""

persistent_session_builtin_sess_msg_table.label:
"""Persistent session messages"""

mqtt_mqueue_store_qos0.desc:
"""Specifies whether to store QoS 0 messages in the message queue while the connection is down but the session remains."""

Expand Down Expand Up @@ -1389,14 +1326,6 @@ Supported configurations are the following:
mqtt_peer_cert_as_clientid.label:
"""Use Peer Certificate as Client ID"""

persistent_session_store_message_gc_interval.desc:
"""The starting interval for garbage collection of undelivered messages to
a persistent session. This affects how often the "max_retain_undelivered"
is checked for removal."""

persistent_session_store_message_gc_interval.label:
"""Message GC interval"""

broker_shared_dispatch_ack_enabled.desc:
"""Deprecated.
This was designed to avoid dispatching messages to a shared-subscription session which has the client disconnected.
Expand Down Expand Up @@ -1606,18 +1535,6 @@ session_persistence_enable.desc:
"""Use durable storage for client sessions persistence.
If enabled, sessions configured to outlive client connections, along with their corresponding messages, will be durably stored and survive broker downtime."""

session_persistence_storage.desc:
"""Durable storage backend to use for session persistence."""

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."""

session_ds_session_gc_interval.desc:
"""The interval at which session garbage collection is executed for persistent sessions."""

Expand Down

0 comments on commit f754cdf

Please sign in to comment.