Skip to content

Commit c30cd64

Browse files
Merge pull request #8308 from rabbitmq/default-to-cqv2
Default to classic queues v2
2 parents fba3329 + 3c52f55 commit c30cd64

File tree

7 files changed

+168
-7
lines changed

7 files changed

+168
-7
lines changed

deps/rabbit/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ _APP_ENV = """[
8585
]},
8686
{halt_on_upgrade_failure, true},
8787
{ssl_apps, [asn1, crypto, public_key, ssl]},
88+
%% classic queue storage implementation version
89+
{classic_queue_default_version, 2},
8890
%% see rabbitmq-server#114
8991
{mirroring_flow_control, true},
9092
{mirroring_sync_batch_size, 4096},

deps/rabbit/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ define PROJECT_ENV
6565
]},
6666
{halt_on_upgrade_failure, true},
6767
{ssl_apps, [asn1, crypto, public_key, ssl]},
68+
%% classic queue storage implementation version
69+
{classic_queue_default_version, 2},
6870
%% see rabbitmq-server#114
6971
{mirroring_flow_control, true},
7072
{mirroring_sync_batch_size, 4096},

deps/rabbit/priv/schema/rabbit.schema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,7 @@ end}.
24722472

24732473
{translation, "rabbit.classic_queue_default_version",
24742474
fun(Conf) ->
2475-
case cuttlefish:conf_get("classic_queue.default_version", Conf, 1) of
2475+
case cuttlefish:conf_get("classic_queue.default_version", Conf, 2) of
24762476
1 -> 1;
24772477
2 -> 2;
24782478
_ -> cuttlefish:unset()

deps/rabbit/src/rabbit_amqqueue_process.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,12 @@ init_queue_mode(Mode, State = #q {backing_queue = BQ,
470470

471471
init_queue_version(Version0, State = #q {backing_queue = BQ,
472472
backing_queue_state = BQS}) ->
473-
%% When the version is undefined we use the default version 1.
473+
%% When the version is undefined we use the default version 2.
474474
%% We want to BQ:set_queue_version in all cases because a v2
475475
%% policy might have been deleted, for example, and we want
476476
%% the queue to go back to v1.
477477
Version = case Version0 of
478-
undefined -> rabbit_misc:get_env(rabbit, classic_queue_default_version, 1);
478+
undefined -> rabbit_misc:get_env(rabbit, classic_queue_default_version, 2);
479479
_ -> Version0
480480
end,
481481
BQS1 = BQ:set_queue_version(Version, BQS),

deps/rabbit/src/rabbit_variable_queue.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,11 @@ process_recovery_terms(Terms) ->
490490
PRef -> {PRef, Terms}
491491
end.
492492

493+
%% If queue-version is undefined, we assume v2 starting with RabbitMQ 3.13.0.
493494
queue_version(Q) ->
494495
Resolve = fun(_, ArgVal) -> ArgVal end,
495496
case rabbit_queue_type_util:args_policy_lookup(<<"queue-version">>, Resolve, Q) of
496-
undefined -> rabbit_misc:get_env(rabbit, classic_queue_default_version, 1);
497+
undefined -> rabbit_misc:get_env(rabbit, classic_queue_default_version, 2);
497498
Vsn when is_integer(Vsn) -> Vsn;
498499
Vsn -> binary_to_integer(Vsn)
499500
end.

deps/rabbit/test/dynamic_ha_SUITE.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,16 +1018,16 @@ apply_policy(Config, N, undefined) ->
10181018
apply_policy(Config, N, all) ->
10191019
rabbit_ct_broker_helpers:set_ha_policy(
10201020
Config, N, ?POLICY, <<"all">>,
1021-
[{<<"ha-sync-mode">>, <<"automatic">>}]);
1021+
[{<<"ha-sync-mode">>, <<"automatic">>}, {<<"queue-mode">>, <<"lazy">>}]);
10221022
apply_policy(Config, N, {nodes, Nodes}) ->
10231023
NNodes = [atom_to_binary(Node) || Node <- Nodes],
10241024
rabbit_ct_broker_helpers:set_ha_policy(
10251025
Config, N, ?POLICY, {<<"nodes">>, NNodes},
1026-
[{<<"ha-sync-mode">>, <<"automatic">>}]);
1026+
[{<<"ha-sync-mode">>, <<"automatic">>}, {<<"queue-mode">>, <<"lazy">>}]);
10271027
apply_policy(Config, N, {exactly, Exactly}) ->
10281028
rabbit_ct_broker_helpers:set_ha_policy(
10291029
Config, N, ?POLICY, {<<"exactly">>, Exactly},
1030-
[{<<"ha-sync-mode">>, <<"automatic">>}]).
1030+
[{<<"ha-sync-mode">>, <<"automatic">>}, {<<"queue-mode">>, <<"lazy">>}]).
10311031

10321032
forget_cluster_node(Config, Node, NodeToRemove) ->
10331033
rabbit_ct_broker_helpers:rabbitmqctl(

release-notes/3.13.0.md

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
## RabbitMQ 3.13.0
2+
3+
RabbitMQ `3.12.0` is a new feature release.
4+
5+
## Highlights
6+
7+
This release includes several new features, optimizations, and graduates (makes mandatory) a number of feature flags.
8+
9+
The user-facing areas that have seen the biggest improvements in this release are
10+
11+
* Classic queues use version 2 of the format format. This should significantly improve performance.
12+
13+
This release also features many internal API improvements in preparation to 4.0
14+
with [Khepri](https://www.youtube.com/watch?v=huT-zmXvfuM).
15+
16+
See Compatibility Notes below to learn about breaking or potentially breaking changes in this release.
17+
18+
## Release Artifacts
19+
20+
RabbitMQ releases are distributed via [GitHub](https://github.com/rabbitmq/rabbitmq-server/releases).
21+
[Debian](https://rabbitmq.com/install-debian.html) and [RPM packages](https://rabbitmq.com/install-rpm.html) are available via Cloudsmith mirrors, as well as [PackageCloud](https://packagecloud.io/rabbitmq).
22+
23+
[Community Docker image](https://hub.docker.com/_/rabbitmq/), [Chocolatey package](https://community.chocolatey.org/packages/rabbitmq), and the [Homebrew formula](https://rabbitmq.com/install-homebrew.html)
24+
are other installation options. They are updated with a delay (usually a few days).
25+
26+
27+
## Erlang/OTP Compatibility Notes
28+
29+
This release [requires Erlang 25.0](https://www.rabbitmq.com/which-erlang.html) or later.
30+
This introduces feature parity for x86- and ARM64-based CPUs: Erlang 25 offers the JIT and
31+
[modern Flame Graph profiling](https://blog.rabbitmq.com/posts/2022/05/flame-graphs/) tooling
32+
for both of those major CPU architectures.
33+
34+
[Provisioning Latest Erlang Releases](https://www.rabbitmq.com/which-erlang.html#erlang-repositories) explains
35+
what package repositories and tools can be used to provision latest patch versions of Erlang 25.x.
36+
37+
## Upgrading to 3.13
38+
39+
### Documentation guides on upgrades
40+
41+
See the [Upgrading guide](https://www.rabbitmq.com/upgrade.html) for documentation on upgrades and [RabbitMQ change log](https://www.rabbitmq.com/changelog.html)
42+
for release notes of other releases.
43+
44+
### Required Feature Flags
45+
46+
47+
### Mixed version cluster compatibility
48+
49+
RabbitMQ 3.13.0 nodes can run alongside `3.12.x` nodes. `3.12.x`-specific features can only be made available when all nodes in the cluster
50+
upgrade to 3.13.0 or any other patch release in the new series.
51+
52+
While operating in mixed version mode, some aspects of the system may not behave as expected. The list of known behavior changes is covered below.
53+
Once all nodes are upgraded to 3.13.0, these irregularities will go away.
54+
55+
Mixed version clusters are a mechanism that allows rolling upgrade and are not meant to be run for extended
56+
periods of time (no more than a few hours).
57+
58+
59+
60+
## Compatibility Notes
61+
62+
### More Feature Flags Gratuate to Core Features ("Always Enabled")
63+
64+
65+
### Minimum Supported Erlang Version
66+
67+
Starting with this release, RabbitMQ requires Erlang 25.0 or later versions. Nodes **will fail to start**
68+
on older Erlang releases.
69+
70+
Erlang 25 as our new baseline means much improved performance on ARM64 architectures, [profiling with flame graphs](https://blog.rabbitmq.com/posts/2022/05/flame-graphs/)
71+
across all architectures, and the most recent TLS 1.3 implementation available to all RabbitMQ 3.11 users.
72+
73+
74+
### Client Library Compatibility
75+
76+
Client libraries that were compatible with RabbitMQ `3.12.x` will be compatible with `3.13.0`.
77+
78+
79+
### Getting Help
80+
81+
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).
82+
83+
84+
## Changes Worth Mentioning
85+
86+
Release notes are kept under [rabbitmq-server/release-notes](https://github.com/rabbitmq/rabbitmq-server/tree/v3.11.x/release-notes).
87+
88+
### Core Server
89+
90+
#### Enhancements
91+
92+
* Reduced memory footprint, improved memory use predictability and throughput of classic queues (version 2, or CQv2).
93+
This particularly benefits classic queues with longer backlogs.
94+
95+
Classic queue v2 (CQv2) storage implementation **is now the default**. It is possible to switch
96+
the default back to CQv1 using `rabbitmq.conf`:
97+
98+
``` ini
99+
# uses CQv1 by default
100+
classic_queue.default_version = 1
101+
```
102+
103+
Individual queues can be declared by passing `x-queue-version` argument and/or through a `queue-version` policy.
104+
105+
#### Bug Fixes
106+
107+
This release includes all bug fixes shipped in the `3.12.x` series.
108+
109+
110+
111+
### CLI Tools
112+
113+
#### Enhancements
114+
115+
116+
#### Bug Fixes
117+
118+
119+
120+
### MQTT Plugin
121+
122+
#### Enhancements
123+
124+
125+
### Management Plugin
126+
127+
#### Enhancements
128+
129+
130+
#### Bug Fixes
131+
132+
133+
### OAuth 2 AuthN/AuthZ Backend Plugin
134+
135+
#### Enhancement
136+
137+
138+
### HTTPS AuthN/AuthZ Backend Plugin
139+
140+
#### Bug Fixes
141+
142+
143+
### Consul Peer Discovery Plugin
144+
145+
#### Bug Fixes
146+
147+
148+
149+
### Dependency Changes
150+
151+
152+
153+
## Source Code Archives
154+
155+
To obtain source code of the entire distribution, please download the archive named `rabbitmq-server-3.13.0.tar.xz`
156+
instead of the source tarball produced by GitHub.

0 commit comments

Comments
 (0)