Skip to content

Commit

Permalink
Merge pull request #12766 from SergeTupchiy/EMQX-12058-improve-force-…
Browse files Browse the repository at this point in the history
…shutdown-error-reason

chore: rename `message_queue_too_long` to `mailbox_overflow`
  • Loading branch information
SergeTupchiy committed Mar 22, 2024
2 parents 23ad37f + d2a1a7f commit 8e979d5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/emqx_utils/src/emqx_utils.erl
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ check_oom(Pid, #{
ok;
[{message_queue_len, QLen}, {total_heap_size, HeapSize}] ->
do_check_oom([
{QLen, MaxQLen, message_queue_too_long},
{QLen, MaxQLen, mailbox_overflow},
{HeapSize, MaxHeapSize, proc_heap_too_large}
])
end.
Expand Down
2 changes: 1 addition & 1 deletion apps/emqx_utils/test/emqx_utils_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ t_check(_) ->
?assertEqual(ok, emqx_utils:check_oom(Policy)),
[self() ! {msg, I} || I <- lists:seq(1, 6)],
?assertEqual(
{shutdown, #{reason => message_queue_too_long, value => 11, max => 10}},
{shutdown, #{reason => mailbox_overflow, value => 11, max => 10}},
emqx_utils:check_oom(Policy)
).

Expand Down
3 changes: 3 additions & 0 deletions changes/ce/fix-12766.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Rename `message_queue_too_long` error reason to `mailbox_overflow`

`mailbox_overflow` is consistent with the corresponding config parameter: `force_shutdown.max_mailbox_size`.

0 comments on commit 8e979d5

Please sign in to comment.