Skip to content

Increase classic queue shutdown timeout (backport #3409) #3473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deps/rabbit/src/rabbit_amqqueue_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ start_link(Q, StartMode) ->
Marker = spawn_link(fun() -> receive stop -> ok end end),
ChildSpec = {rabbit_amqqueue,
{rabbit_prequeue, start_link, [Q, StartMode, Marker]},
intrinsic, ?WORKER_WAIT, worker, [rabbit_amqqueue_process,
rabbit_mirror_queue_slave]},
intrinsic, ?CLASSIC_QUEUE_WORKER_WAIT, worker,
[rabbit_amqqueue_process, rabbit_mirror_queue_slave]},
{ok, SupPid} = supervisor2:start_link(?MODULE, []),
{ok, QPid} = supervisor2:start_child(SupPid, ChildSpec),
unlink(Marker),
Expand Down
4 changes: 3 additions & 1 deletion deps/rabbit_common/include/rabbit.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,11 @@
-define(SUPERVISOR_WAIT,
rabbit_misc:get_env(rabbit, supervisor_shutdown_timeout, infinity)).
-define(WORKER_WAIT,
rabbit_misc:get_env(rabbit, worker_shutdown_timeout, 30000)).
rabbit_misc:get_env(rabbit, worker_shutdown_timeout, 300000)).
-define(MSG_STORE_WORKER_WAIT,
rabbit_misc:get_env(rabbit, msg_store_shutdown_timeout, 600000)).
-define(CLASSIC_QUEUE_WORKER_WAIT,
rabbit_misc:get_env(rabbit, classic_queue_shutdown_timeout, 600000)).

-define(HIBERNATE_AFTER_MIN, 1000).
-define(DESIRED_HIBERNATE, 10000).
Expand Down
15 changes: 11 additions & 4 deletions deps/rabbitmq_federation/test/queue_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

-import(rabbit_federation_test_util,
[wait_for_federation/2, expect/3, expect/4,
set_upstream/4, set_upstream/5, clear_upstream/3, set_policy/5, clear_policy/3,
set_upstream/4, set_upstream/5, clear_upstream/3, clear_upstream_set/3,
set_policy/5, clear_policy/3,
set_policy_pattern/5, set_policy_upstream/5, q/2, with_ch/3,
maybe_declare_queue/3, delete_queue/2,
federation_links_in_vhost/3]).
Expand All @@ -35,7 +36,7 @@ groups() ->
multiple_upstreams,
multiple_upstreams_pattern,
multiple_downstreams,
bidirectional,
message_flow,
dynamic_reconfiguration,
federate_unfederate,
dynamic_plugin_stop_start
Expand Down Expand Up @@ -239,7 +240,7 @@ multiple_downstreams(Config) ->
expect_federation(Ch, <<"upstream">>, <<"fed.downstream2">>, ?EXPECT_FEDERATION_TIMEOUT)
end, upstream_downstream(Config) ++ [q(<<"fed.downstream2">>, Args)]).

bidirectional(Config) ->
message_flow(Config) ->
%% TODO: specifc source / target here
Args = ?config(source_queue_args, Config),
with_ch(Config,
Expand All @@ -257,7 +258,13 @@ bidirectional(Config) ->
[publish(Ch, <<>>, <<"two">>, <<"bulk">>) || _ <- Seq],
expect(Ch, <<"two">>, repeat(100, <<"bulk">>)),
expect_empty(Ch, <<"one">>),
expect_empty(Ch, <<"two">>)
expect_empty(Ch, <<"two">>),
%% We clear the federation configuration to avoid a race condition
%% when deleting the queues in quorum mode. The federation link
%% would restart and lead to a state where nothing happened for
%% minutes.
clear_upstream_set(Config, 0, <<"one">>),
clear_upstream_set(Config, 0, <<"two">>)
end, [q(<<"one">>, Args),
q(<<"two">>, Args)]).

Expand Down
68 changes: 68 additions & 0 deletions release-notes/3.8.23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## RabbitMQ 3.8.23

RabbitMQ `3.8.23` is a maintenance release.
All users are recommended to upgrade to this release.

### Obtaining Packages

RabbitMQ releases are distributed via [GitHub](https://github.com/rabbitmq/rabbitmq-server/releases), [Cloudsmith](https://cloudsmith.io/~rabbitmq/repos/),
and [PackageCloud](https://packagecloud.io/rabbitmq).

### Erlang/OTP Compatibility Notes

This release [requires Erlang 23.2](https://www.rabbitmq.com/which-erlang.html) and [supports Erlang 24](https://blog.rabbitmq.com/posts/2021/03/erlang-24-support-roadmap/).

[Provisioning Latest Erlang Releases](https://www.rabbitmq.com/which-erlang.html#erlang-repositories) explains
what package repositories and tools can be used to provision modern Erlang versions.


## Upgrade and Compatibility Notes

See the [Upgrading guide](https://www.rabbitmq.com/upgrade.html) for general documentation on upgrades and
[RabbitMQ change log](https://www.rabbitmq.com/changelog.html) for release notes of other releases.

If upgrading from a`3.7.x` release, see [3.8.0 release notes](https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.8.0)
upgrade and compatibility notes first.

If upgrading from a `3.6.x` or older [release series](https://www.rabbitmq.com/versions.html), first upgrade
to [`3.7.27`](https://github.com/rabbitmq/rabbitmq-server/releases/tag/v3.7.27) and then to this version.


## Getting Help

Any questions about this release, upgrades or RabbitMQ in general are welcome on the [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users)
and [RabbitMQ community Slack](https://rabbitmq-slack.herokuapp.com/).


## Changes Worth Mentioning

Release notes are kept under [rabbitmq-server/release-notes](https://github.com/rabbitmq/rabbitmq-server/tree/v3.8.x/release-notes).
Contributors are encouraged to update them together with their changes. This helps with release automation and more
consistent release schedule.


### Core Server

#### Bug Fixes

* TLS information delivered in [Proxy protocol](https://www.rabbitmq.com/networking.html#proxy-protocol) header is now attached to connection metrics as if it was provided by a non-proxying client.

GitHub issue: [#3175](https://github.com/rabbitmq/rabbitmq-server/pull/3175) contributed by @prefiks, sponsored by CloudAMQP

* Classic queue shutdown now uses a much higher timeout (up to 10 minutes instead of 30 seconds).

In environments with many queues (especially mirrored queues) and many consumers this means that
the chance of queue indices rebuilding after node restart is now substantially lower.

GitHub issue: [#3409](https://github.com/rabbitmq/rabbitmq-server/pull/3409)


## Dependency Upgrades

No dependency changes in this release.


## Source Code Archives

To obtain source code of the entire distribution, please download the archive named `rabbitmq-server-3.8.23.tar.xz`
instead of the source tarball produced by GitHub.
7 changes: 7 additions & 0 deletions release-notes/3.9.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ Contributors are encouraged to update them together with their changes. This hel

GitHub issue: [#3340](https://github.com/rabbitmq/rabbitmq-server/pull/3340)

* Classic queue shutdown now uses a much higher timeout (up to 10 minutes instead of 30 seconds).

In environments with many queues (especially mirrored queues) and many consumers this means that
the chance of queue indices rebuilding after node restart is now substantially lower.

GitHub issue: [#3409](https://github.com/rabbitmq/rabbitmq-server/pull/3409)


### Management Plugin

Expand Down