Merge pull request #12766 from SergeTupchiy/EMQX-12058-improve-force-shutdown-error-reason

chore: rename `message_queue_too_long` to `mailbox_overflow`
This commit is contained in:
SergeTupchiy 2024-03-22 14:32:06 +02:00 committed by GitHub
commit 8e979d511c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 2 deletions

View File

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

View File

@ -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)
).

View File

@ -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`.