Commit Graph

58811 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron 96069a84a7
Run RabbitMQ under ktrace(1) 2025-02-21 18:11:37 +01:00
Aitor Pérez Cedres 79febc501b
Merge pull request #13389 from rabbitmq/mocha-dockerfile-configurable
Configure location of mocha-test dockerfile
2025-02-21 11:36:59 +00:00
Marcial Rosales c3da54c3ea Remove duplicate flag 2025-02-21 11:53:27 +01:00
Marcial Rosales 94c28d642b Configure location of mocha-test dockerfile 2025-02-21 11:33:26 +01:00
Michael Klishin 71a7b417d1
Merge pull request #13382 from noxdafox/main
rabbit_backing_queue: pass mc:state() to discard callback
2025-02-20 21:07:42 -05:00
Matteo Cafasso b49ba9630a rabbit_backing_queue: pass mc:state() to discard callback 2025-02-20 23:30:10 +02:00
Jean-Sébastien Pédron cc0458a139
Merge pull request #13346 from rabbitmq/fix-recursion-error-in-rabbit_stream_queue_SUITE
Small programming error fixes in testsuites
2025-02-20 11:23:18 +01:00
Jean-Sébastien Pédron a5f30ea02e
GitHub workflows: List open TCP ports
This may help debug nodes that try to open busy ports.
2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron 64b68e5d9c
unit_credit_flow_SUITE: Greatly reduce time trap 2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron b7c9e648ea
amqp_auth_SUITE: Handle error in init_per_group/2 2025-02-20 09:47:40 +01:00
Jean-Sébastien Pédron ee0b5b5f32
rabbit_stream_queue_SUITE: Fix recursion issue
... in retry_if_coordinator_unavailable().
2025-02-20 09:47:33 +01:00
Michael Klishin 789fc64d8f
Merge pull request #13374 from rabbitmq/rabbitmq-server-12743
By @noxdafox: Revival of #9620 Pass the message to rabbit_backing_queue:discard callback
2025-02-19 21:12:52 -05:00
Matteo Cafasso 4dfa447541
Adopt new rabbit_backing_queue:discard implementation
Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
(cherry picked from commit facddb363f)
2025-02-19 18:20:01 -05:00
Matteo Cafasso d6a19bbde0
rabbit_backing_queue: pass the whole message to discard callback
The previous behaviour was passing solely the message ID making
queue implementations such as, for example, the priority one hard
to fulfil.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
(cherry picked from commit 1f7a27c51d)
2025-02-19 18:19:54 -05:00
Michael Klishin 0eb65c2f86
Merge pull request #13250 from cloudamqp/large_message_rdq_scan
4.x: Optimise msg_store recovery in case of large message file
2025-02-19 15:49:29 -05:00
Michael Klishin e936638569
Merge pull request #13370 from rabbitmq/gazelle-main
bazel run gazelle
2025-02-19 15:41:01 -05:00
Arnaud Cogoluègnes e818136b09
Merge pull request #13360 from rabbitmq/remove-set-stream-retention-policy-command
Remove set_stream_retention_policy command
2025-02-19 09:38:14 +00:00
GitHub 9a9c543a85 bazel run gazelle 2025-02-19 04:02:33 +00:00
Michael Klishin 819b80bfc9
Merge pull request #13365 from rabbitmq/cow-uri
Delete rabbit_uri
2025-02-18 11:36:06 -05:00
Michael Klishin 9a5a321f0d
Merge pull request #13364 from rabbitmq/recover-ts
Recover "received timestamp" when reading from stream
2025-02-18 11:31:27 -05:00
David Ansari 2350299fde Delete rabbit_uri
Since https://github.com/rabbitmq/rabbitmq-server/pull/13242 updated
Cowlib to v2.14.0, this commit deletes rabbit_uri as written in the
comments of rabbit_uri.erl:
```
This file is a partial copy of
https://github.com/ninenines/cowlib/blob/optimise-urldecode/src/cow_uri.erl
We use this copy because:
1. uri_string:unquote/1 is lax: It doesn't validate that characters that are
   required to be percent encoded are indeed percent encoded. In RabbitMQ,
   we want to enforce that proper percent encoding is done by AMQP clients.
2. uri_string:unquote/1 and cow_uri:urldecode/1 in cowlib v2.13.0 are both
   slow because they allocate a new binary for the common case where no
   character was percent encoded.
When a new cowlib version is released, we should make app rabbit depend on
app cowlib calling cow_uri:urldecode/1 and delete this file (rabbit_uri.erl).
```
2025-02-18 15:46:16 +01:00
David Ansari 7e7173000f Recover "received timestamp" when reading from stream
When reading from a stream recover the message container annotation `rts` (received timestamp).
2025-02-18 15:11:15 +01:00
Loïc Hoguin 99a09dfa0e
Merge pull request #13242 from rabbitmq/loic-update-cowboy-2025
Update Cowboy
2025-02-18 12:17:16 +01:00
Loïc Hoguin 3e00c84e9f
Update Cowboy, Cowlib and Ranch
Cowboy 2.13 contains the Websocket optimisations as well
as the ability to set the Websocket max_frame_size option
dynamically, plus plenty of other improvements.

Cowlib was added as a test dep to rabbitmq_mqtt to make
sure emqtt doesn't pull the wrong Cowlib version for Cowboy.
2025-02-18 11:15:08 +01:00
Arnaud Cogoluègnes 7ea2ff2651
Remove set_stream_retention_policy command
It is not working as expected. Policies are the way to change data retention for stream.
2025-02-18 11:06:04 +01:00
Michael Klishin fa44b764b7
RPM packaging: drop old targets 2025-02-17 16:08:00 -05:00
Michael Klishin 9222e3b1c1
Merge pull request #13351 from rabbitmq/cli-module-attribute-otp28
CLI: Don't use regex as module attributes
2025-02-17 11:49:33 -05:00
Michael Klishin 0773b56139
Merge pull request #13353 from rabbitmq/mgmt-ui-update-tooltips
Update queue-messages and queue-message-body-bytes tooltips
2025-02-17 11:47:47 -05:00
Michal Kuratczyk 4b30935182
Update queue-messages and queue-message-body-bytes tooltips
Only large messages delivered to multiple CQs are stored once for
multiple queues.

Non-durable queues are deprecated and will be removed, so don't even
mention them.

We don't "page out" messages anymore.
2025-02-17 15:58:20 +01:00
Michal Kuratczyk 7e8ecc96db
CLI: Don't use regex as module attributes
When trying to use OTP28.0-rc1, Elixir fails to compile these modules
because a module attribute cannot be a regex. It is not yet clear
whether it's something to be fixed in Elixir for OTP28 compatibility
or something that accidentally worked in the past, but either way,
using a string as an attribute is equally good and works all OTP
versions, including OTP28.0-rc1.

```
== Compilation error in file lib/rabbitmq/cli/core/command_modules.ex ==
** (ArgumentError) cannot inject attribute @commands_ns into function/macro because cannot escape #Reference<0.2201422310.1333657602.13657>. The supported values are: lists, tuples, maps, atoms, numbers, bitstrings, PIDs and remote functions in the format &Mod.fun/arity
    (elixir 1.18.2) lib/kernel.ex:3729: Kernel.do_at/5
    (elixir 1.18.2) expanding macro: Kernel.@/1
    lib/rabbitmq/cli/core/command_modules.ex:133: RabbitMQ.CLI.Core.CommandModules.make_module_map/2
```
2025-02-17 11:56:30 +01:00
Péter Gömöri fb21a19b72 Optimise msg_store recovery in case of large message file
Since 4.0.0 (commit d45fbc3d) the shared message store writes large
messages into their own rdq files. This information can be utilised
when scanning rdq files during recovery to avoid reading in the whole
message body into memory unnecessarily.

This commit addresses the same issue that was addressed in 3.13.x by
commit baeefbec (ie. appending a large binary together from 4MB chunks
leaves a lot of garbage and memory fragmentation behind) but even more
efficiently.

Large messages which were written before 4.0.0, which don't fully fill
the rdq file, are still handled as before.
2025-02-14 17:16:43 +01:00
Michael Klishin c4706616db
Merge pull request #13342 from rabbitmq/gazelle-main
bazel run gazelle
2025-02-14 10:39:03 -05:00
David Ansari 0ee5e74a73 Fix flake in test consume_from_replica
```
make -C deps/rabbit ct-rabbit_stream_queue t=cluster_size_3_parallel_1 RABBITMQ_METADATA_STORE=mnesia
```

flaked prior to this commit locally on Ubuntu with the following error after 11 runs:
```
rabbit_stream_queue_SUITE > cluster_size_3_parallel_1 > consume_from_replica
{error,
    {{shutdown,
         {server_initiated_close,406,
             <<"PRECONDITION_FAILED - stream queue 'consume_from_replica' in vhost '/' does not have a running replica on the local node">>}},
     {gen_server,call,
         [<0.8365.0>,
          {subscribe,
              {'basic.consume',0,<<"consume_from_replica">>,
                  <<"ctag">>,false,false,false,false,
                  [{<<"x-stream-offset">>,long,0}]},
              <0.8151.0>},
          infinity]}}}
```
2025-02-14 13:40:25 +01:00
GitHub ed8001ab07 bazel run gazelle 2025-02-14 04:02:28 +00:00
Michael Klishin 13e24d3172
Merge pull request #13328 from rabbitmq/ra-2.16.2
Ra v2.16.2
2025-02-13 13:14:55 -05:00
Michael Klishin a24aef632e
Merge pull request #13307 from rabbitmq/recover-exch-rk-from-amqp
Mc: introduce new function in mc_amqp to init mc from stream data
2025-02-13 13:14:29 -05:00
Michael Klishin 82eb311331
Merge pull request #13325 from rabbitmq/add-cache-cli-to-auth-cache
Follow-up: finish 'rabbitmqctl clear_auth_backend_cache' plus add tests
2025-02-13 12:54:57 -05:00
Jean-Sébastien Pédron d14aa07475
Merge pull request #13329 from rabbitmq/increase-parallel-ct-sets-dedicated-tcp-range
Increase the TCP ports range used by `parallel-ct-set-*`
2025-02-13 17:49:38 +01:00
David Ansari 3daef04566 Trap exit in AMQP 1.0 client proc
Trap exit signal such that terminate/3 gets executed so that
the socket is closed cleanly.
2025-02-13 17:02:51 +01:00
Arnaud Cogoluègnes ee710ca3f9
Group Maven dependencies in dev/prod in dependabot
Not sure what it means for Maven, but it should group dependency
upgrades in few PRs.
2025-02-13 16:35:49 +01:00
Karl Nilsson 42db0c659c Ra v2.16.2
This is a bugfix release of Ra:

* Fix last_index counter lag
* Fix off by one in follower assertion
* Fix log divergence bug
2025-02-13 15:27:45 +00:00
Arnaud Cogoluègnes b0d0d630ba
Group Java dependency upgrades
Run every Saturday and group the upgrades in one PR by branch.
2025-02-13 15:50:57 +01:00
Jean-Sébastien Pédron e76c227131
Increase the TCP ports range used by parallel-ct-set-*
[Why]
We see nodes trying to use busy ports in CI from time to time.
2025-02-13 15:37:39 +01:00
Arnaud Cogoluègnes f3d8eaadb0
Merge pull request #13324 from rabbitmq/jms-tests-infra
Use JUnit extension to configure JMS tests
2025-02-13 13:52:58 +00:00
Marcial Rosales dd1665ec85 Add clear cache function impl 2025-02-13 13:46:41 +01:00
Jean-Sébastien Pédron 3887256142
Merge pull request #13323 from rabbitmq/adapt-clustering_management_SUITE-to-khepri-0.17.0
clustering_management_SUITE: Use old node as seed node
2025-02-13 13:05:01 +01:00
David Ansari 6366eafa3b Simplify 2025-02-13 12:46:09 +01:00
Karl Nilsson 32615bf5f0 Mc: introduce new function in mc_amqp to init mc from stream.
Initialising a message container from data stored in a
stream is a special case where we need to recover exchange
and routing key information from the following message annatations:

* x-exchange
* x-routing-keys
* x-cc

We do not want to do this when initialising a message container
from AMQP data just received from a publisher.

This commit introduces a new function `mc_amqp:init_from_stream/2`
that is to be used when needing a message container from a stream
message.
2025-02-13 10:52:12 +00:00
Jean-Sébastien Pédron d2576dd909
Merge pull request #13248 from rabbitmq/adapt-peer-discovery-testsuites-to-khepri-0.17.0
Skip peer discovery clustering tests if multiple Khepri machine versions
2025-02-13 11:11:00 +01:00
Arnaud Cogoluègnes 7d8f83c919
Control queue type with annotation in JMS tests 2025-02-13 10:44:09 +01:00