Skip to content

Commit 5471403

Browse files
authored
Merge pull request #4521 from esl/remove-max-fsm-queue
Remove the dead 'max_fsm_queue' option After the c2s, s2s and components rework, this option becomes dead. You could set it but it had no effect. There are no plans to bring it back, and shapers are recommended instead. To do for the future: add notes to the migration guide. This is left out from this PR, because we have to update the migration guide after merging faeture/listeners anyway.
2 parents 321006a + e2be2a0 commit 5471403

File tree

7 files changed

+1
-21
lines changed

7 files changed

+1
-21
lines changed

doc/configuration/general.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,3 @@ The options listed below are used to configure more specific settings, that do n
182182
* **Example:** `http_server_name = "Apache"`
183183

184184
Replaces [Cowboy](https://github.com/ninenines/cowboy)'s default name returned in the `server` HTTP response header. It may be used for extra security, as it makes it harder for the malicious user to learn what HTTP software is running under a specific port. This option applies to **all** configured HTTP listeners.
185-
186-
### `general.max_fsm_queue`
187-
* **Syntax:** positive integer
188-
* **Default:** not set
189-
* **Example:** `max_fsm_queue = 5000`
190-
191-
When specified, will terminate certain processes (e.g. client handlers) that have more messages accumulated in the queue than the specified limit, to prevent resource exhaustion.
192-
This option is set for outgoing S2S connections and can be overridden for particular `s2s` listeners in their configurations. **Use with caution!**

rel/files/mongooseim.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
{{#s2s_backend}}
1515
s2s_backend = {{{s2s_backend}}}
1616
{{/s2s_backend}}
17-
max_fsm_queue = 1000
1817
{{#http_server_name}}
1918
http_server_name = {{{http_server_name}}}
2019
{{/http_server_name}}

src/config/mongoose_config_spec.erl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ general() ->
180180
<<"s2s_backend">> => #option{type = atom,
181181
validate = {module, mongoose_s2s},
182182
wrap = global_config},
183-
<<"max_fsm_queue">> => #option{type = integer,
184-
validate = positive,
185-
wrap = global_config},
186183
<<"http_server_name">> => #option{type = string,
187184
wrap = global_config},
188185
<<"rdbms_server_type">> => #option{type = atom,

test/common/config_parser_helper.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ options("mongooseim-pgsql") ->
249249
})
250250
]},
251251
{loglevel, warning},
252-
{max_fsm_queue, 1000},
253252
{outgoing_pools,
254253
lists:map(
255254
fun pool_config/1,

test/config_parser_SUITE.erl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ groups() ->
7777
sm_backend,
7878
component_backend,
7979
s2s_backend,
80-
max_fsm_queue,
8180
http_server_name,
8281
rdbms_server_type,
8382
route_subdomains,
@@ -415,10 +414,6 @@ s2s_backend(_Config) ->
415414
?err(#{<<"general">> => #{<<"s2s_backend">> => <<"redis">>}}),
416415
?err(#{<<"general">> => #{<<"s2s_backend">> => <<"amnesia">>}}).
417416

418-
max_fsm_queue(_Config) ->
419-
?cfg(max_fsm_queue, 100, #{<<"general">> => #{<<"max_fsm_queue">> => 100}}),
420-
?err(#{<<"general">> => #{<<"max_fsm_queue">> => -10}}).
421-
422417
http_server_name(_Config) ->
423418
?cfg(http_server_name, "my server",
424419
#{<<"general">> => #{<<"http_server_name">> => <<"my server">>}}),

test/config_parser_SUITE_data/mongooseim-pgsql.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
registration_timeout = "infinity"
1010
language = "en"
1111
sm_backend = "mnesia"
12-
max_fsm_queue = 1000
1312

1413
[internal_databases.mnesia]
1514

test/mongoose_rdbms_SUITE.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ unset_opts() ->
137137
mongoose_config:erase_opts().
138138

139139
opts() ->
140-
#{max_fsm_queue => 1024,
141-
instrumentation => config_parser_helper:default_config([instrumentation])}.
140+
#{instrumentation => config_parser_helper:default_config([instrumentation])}.
142141

143142
meck_db(odbc) ->
144143
meck:new(eodbc, [no_link]),

0 commit comments

Comments
 (0)