Commit Graph

50928 Commits

Author SHA1 Message Date
Michael Klishin 743261e59b
3.10.3 release notes stub 2022-05-23 00:18:13 +04:00
Michael Klishin 1878f0ed05
Update README.md 2022-05-20 20:46:36 +04:00
Michael Klishin 370317a52b
Update 3.10.0.md 2022-05-20 19:04:48 +04:00
Karl Nilsson d50326c6fc Optimise rabbit_fifo:complete function
To avoid traversing the descarded msg id list
multiple times.
2022-05-20 15:14:44 +01:00
Michael Klishin 96e13da330
Merge pull request #4869 from rabbitmq/mk-3.10.2-release-notes
Update 3.10.2 release notes
2022-05-20 15:11:23 +04:00
Michael Klishin fe39ab647f
Update 3.10.2 release notes 2022-05-20 15:10:58 +04:00
Michael Klishin 65e582538c
Update 3.8.32 release notes 2022-05-20 01:20:01 +04:00
Michael Klishin 4007a88796
Update 3.9.18 release notes 2022-05-20 01:19:37 +04:00
Michael Klishin bdcf8bd4da
Update 3.10.2 release notes 2022-05-20 01:19:14 +04:00
Michael Klishin 1373963043
Merge pull request #4862 from rabbitmq/mk-3.10.2-release-notes
Update 3.10.2 release notes
2022-05-19 23:27:25 +04:00
Michael Klishin ebd1baa0ed
Update 3.10.2 release notes 2022-05-19 23:26:51 +04:00
Michael Klishin 76a5857a31
Merge pull request #4857 from rabbitmq/mk-3.9.18-release-notes
Update 3.9.18 release notes
2022-05-19 23:21:34 +04:00
Michael Klishin 85a2aa2424
Update 3.9.18 release notes 2022-05-19 23:21:09 +04:00
Michael Klishin aa3ce4f243
Merge pull request #4855 from rabbitmq/mk-3.8.32-release-notes
Update 3.8.32 release notes
2022-05-19 23:20:00 +04:00
Michael Klishin 5396bf5325
Update 3.8.32 release notes 2022-05-19 23:19:31 +04:00
Michael Klishin 3426eed4a7
Merge pull request #4844 from rabbitmq/loic-cqv2-prim_file-delete
CQv2: file:delete/1 -> prim_file:delete/1
2022-05-19 17:15:59 +04:00
Michael Klishin c22e1cb20e
Merge pull request #4841 from rabbitmq/luos-add-co-fallback
Implement fallback secret for credentials obfuscation (by @luos)
2022-05-19 15:27:13 +04:00
Michael Klishin 721a8f06e3
Skip this test in mixed cluster environments 2022-05-19 14:53:16 +04:00
Loïc Hoguin fcb79e3a2c
CQv2: file:delete/1 -> prim_file:delete/1 2022-05-19 12:10:30 +02:00
Lajos Gerecs 25f8a9611b implement fallback secret for credentials obfuscation
Author:    Lajos Gerecs <lajos.gerecs@erlang-solutions.com>
2022-05-18 23:03:46 +04:00
Michael Klishin 489b839a07 Bazel: make it easier to override Ra branch 2022-05-18 22:20:04 +04:00
Michael Klishin 40faa1e625
Merge pull request #4838 from rabbitmq/handle-void-header-types
Handle void types in AMQP 0.9.1 -> AMQP 1.0 conversion
2022-05-18 20:34:02 +04:00
Karl Nilsson a0dea885f7 tidy up 2022-05-18 17:04:27 +01:00
Karl Nilsson 7242601a2b Handle void types in AMQP 0.9.1 -> AMQP 1.0 conversion
void -> null
2022-05-18 17:01:02 +01:00
Michael Klishin 6cc8eb39ca
Merge pull request #4836 from rabbitmq/max-expiration
Set maximum expiration
2022-05-18 16:53:30 +04:00
David Ansari 2d14403dad Reduce expiry limit from 100 to 10 years 2022-05-18 12:11:57 +00:00
Michal Kuratczyk 128cbcce32 Revert "Update otp-max to OTP 25, Elixir 1.13.4; OpenSSL to 1.1.1o"
This reverts commit 91e7f1be63.
2022-05-18 14:09:47 +02:00
David Ansari de4eeb678e Set maximum expiration
When applications accidentally set an unreasonable high value for
the message TTL expiration field, e.g. 6779303336614035452,
before this commit quorum queue and classic queue processes crashed:

```
2022-05-17 13:35:26.488670+00:00 [notice] <0.1000.0> queue 'test' in vhost '/': candidate -> leader in term: 2 machine version: 2
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>   crasher:
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     initial call: ra_server_proc:init/1
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     pid: <0.1000.0>
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     registered_name: '%2F_test'
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     exception error: bad argument
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>       in function  erlang:start_timer/4
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>          called as erlang:start_timer(6779303336614035351,<0.1000.0>,
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                                       {timeout,expire_msgs},
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                                       [])
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>          *** argument 1: exceeds the maximum supported time value
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>       in call from gen_statem:loop_timeouts_start/16 (gen_statem.erl, line 2108)
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>     ancestors: [<0.999.0>,ra_server_sup_sup,<0.250.0>,ra_systems_sup,ra_sup,
2022-05-17 13:35:26.489492+00:00 [error] <0.1000.0>                   <0.186.0>]
```

In this commit, we disallow expiry fields higher than 100 years.
This causes the channel to be closed which is better than crashing the
queue process.

This new validation applies to message TTLs and queue expiry.

From the docs of erlang:start_timer:
"The absolute point in time, the timer is set to expire on, must be in the interval
[erlang:convert_time_unit(erlang:system_info(start_time), native, millisecond),
 erlang:convert_time_unit(erlang:system_info(end_time), native, millisecond)].
If a relative time is specified, the Time value is not allowed to be negative.

end_time:
The last Erlang monotonic time in native time unit that can be represented
internally in the current Erlang runtime system instance.
The time between the start time and the end time is at least a quarter of a millennium."
2022-05-18 11:01:17 +00:00
Michal Kuratczyk 91e7f1be63 Update otp-max to OTP 25, Elixir 1.13.4; OpenSSL to 1.1.1o 2022-05-18 11:47:57 +02:00
Karl Nilsson 6951d77dec
Merge pull request #4835 from rabbitmq/rebar-config-files-to-root
Move all rebar.config files into the root directory
2022-05-18 10:29:03 +01:00
Karl Nilsson 5ede74b448 Move all rebar.config files into the root directory
Some tools such as nvim + erlang_ls sometimes change the cwd if
they encounter a rebar.config. Here we move all rebar.config files
into the root of the project to avoid this and also have a single
point for formatting configuration.
2022-05-18 09:37:38 +01:00
Michael Klishin 0b477f31cb
Merge pull request #4827 from VictorGaiva/patch-1 2022-05-17 13:12:10 +04:00
Victor Gaiva 4b0b92631b
Update PROTOCOL.adoc
Fix missing ResponseCode in type definition.
2022-05-16 21:15:40 -03:00
Michael Klishin 3f44020dc9
Merge pull request #4814 from rabbitmq/mk-bump-credentials-obfuscation-to-3.1.0
Bump credentials_obfuscation to 3.1.0
2022-05-17 00:22:00 +04:00
Michael Klishin 3f6df2043a
Merge pull request #4819 from rabbitmq/mk-update-3.8.32-release-notes
3.8.32 release notes
2022-05-17 00:13:03 +04:00
Michael Klishin ef91c35d44
3.8.32 release notes 2022-05-17 00:12:38 +04:00
Michael Klishin 0b712dee65
Merge pull request #4817 from rabbitmq/mk-update-3.9.18-release-notes
3.9.18 release notes
2022-05-17 00:10:53 +04:00
Michael Klishin 1e4d41f718
3.9.18 release notes 2022-05-17 00:09:50 +04:00
Michael Klishin 3e8d62be1d
Merge pull request #4815 from rabbitmq/mk-3.10.2-release-notes
3.10.2 release notes
2022-05-17 00:06:13 +04:00
Michael Klishin 43e062918a
3.10.2 release notes 2022-05-17 00:05:25 +04:00
Michael Klishin 949f7e37db
Bump credentials_obfuscation to 3.1.0 2022-05-16 23:54:32 +04:00
Michael Klishin d026ba2d71
Merge pull request #4811 from rabbitmq/amqp10-binary-parser
Increase receiving throughput from a stream for AMQP 0-9-1 clients
2022-05-16 16:15:48 +04:00
David Ansari 4472ddf71c Increase receiving throughput from a stream via AMQP
This commit increases consumption throughput from a stream via AMQP 0.9.1
for 1 consumer by 83k msg/s or 55%,
for 4 consumers by 140k msg/s or 44%.

This commit tries to follow https://www.erlang.org/doc/efficiency_guide/binaryhandling.html
by reusing match contexts instead of creating new sub-binaries.

The CPU and mmap() memory flame graphs show that
when producing and consuming from a stream via AMQP 0.9.1
module amqp10_binary_parser requires
before this commit: 10.1% CPU time and 8.0% of mmap system calls
after this commit:  2.6% CPU time 2.5% of mmap system calls

Performance tests

Start rabbitmq-server without any plugins enabled and with 4 schedulers:
```
make run-broker PLUGINS="" RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="+JPperf true +S 4"
```

Test 1

Perf test client:
```
-x 1 -y 2 -qa x-queue-type=stream -ad false -f persistent -u s1 --qos 10000 --multi-ack-every 1000 -z 30
```

master branch:
sending rate avg msg/s 143k - 146k
receiving rate avg msg/s 188k - 194k

PR:
sending rate avg 133k - 138k
receiving rate avg 266k - 276k

This shows that with AMQP 0.9.1 and a stream, prior to this commit the broker could not
deliver messages to consumers as fast as they were published.
After this commit, it can.

Test 2

First, produce a few millions messages:
```
-x 1 -y 0 -qa x-queue-type=stream -ad false -f persistent -u s2
```
Then, consume them:
```
-x 0 -y 1 -qa x-queue-type=stream -ad false -f persistent -u s2 --qos 10000 --multi-ack-every 1000 -ca x-stream-offset=first -z 30
```

receving rate avg msg/s
master branch:
147k - 156k

PR:
230k - 237k

Improvement: 83k / 55%

Test 3

-x 0 -y 4 -qa x-queue-type=stream -ad false -f persistent -u s2 --qos 10000 --multi-ack-every 1000 -ca x-stream-offset=first -z 30

receving rate avg msg/s
master branch:
313k - 319k

PR:
450k - 461k

Improvement: 140k / 44%
2022-05-16 09:07:46 +00:00
Michael Klishin 5cf3a43523
Revert "Make master depend on credentials_obfuscation main branch"
This reverts commit 62819f3bcc.

This commit has served its QA purpose.

Will either update Bazel dependency to use git or pin to
a new release instead.
2022-05-14 02:58:07 +04:00
Michael Klishin 62819f3bcc
Make master depend on credentials_obfuscation main branch 2022-05-14 01:42:09 +04:00
Michael Klishin 149a7e78cf
Merge pull request #4803 from rabbitmq/rabbitmq-server-4799
Report crypto library version in 'rabbitmq-diagnostics status'
2022-05-12 16:42:40 +04:00
Michael Klishin 7ccd9821d7
Merge pull request #4801 from rabbitmq/less-mmap
Save memory when acking messages to quorum queue
2022-05-12 16:24:37 +04:00
Michael Klishin 2b80ed5c5e
Report crypto library version in 'rabbitmq-diagnostics status'
Just like we do in the node startup banner.

Closes #4799.
2022-05-12 16:19:41 +04:00
David Ansari a45ea01841 Save memory when acking messages to quorum queue
List `MsgIds` has fewer elements than list `Settles`.
Therefore, put it on the left side of the `++` operator.

The memory flame graph revealed that before this commit
5%-8% of all mmap() system calls happened in function
rabbit_fifo_client:settle/3.

After this commit only 1.6% - 1.8% of all mmap() system calls happen in
this function.

Note that we cannot do the same for discarded messages (`Discards`)
because the order in which messages will be dead lettered need to be
preserved.
2022-05-12 11:38:40 +00:00
Michael Klishin 36d2fd6991
Merge pull request #4798 from rabbitmq/format-log-level
Change default format of log level to full name
2022-05-12 15:01:36 +04:00