Commit Graph

59162 Commits

Author SHA1 Message Date
Michael Davis ffda347e87 Hibernate after collecting garbage in `rabbit_mgmt_gc`
The `rabbit_mgmt_gc` gen_server performs garbage collections
periodically. When doing so it can create potentially fairly large
terms, for example by creating a set out of
`rabbit_exchange:list_names/0`. With many exchanges, for example, the
process memory usage can climb steadily especially when the management
agent is mostly idle since `rabbit_mgmt_gc` won't hit enough reductions
to cause a full-sweep GC on itself. Since the process is only active
periodically (once every 2min by default) we can hibernate it to GC the
terms it created.

This can save a medium amount of memory in situations where there are
very many pieces of metadata (exchanges, vhosts, queues, etc.). For
example on an idle single-node broker with 50k exchanges,
`rabbit_mgmt_gc` can hover around 50MB before being naturally GC'd. With
this patch the process memory usage stays consistent between `start_gc`
timer messages at around 1KB.

(cherry picked from commit ce5d42a9d6)
2025-05-16 23:59:19 +00:00
Michael Klishin 49ec73765e
oci-make workflow: use 4.1.x versions on this branch
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
(cherry picked from commit 8e511291d464ecbed361fe4f6a23e9a4e633e914)
2025-05-14 10:39:33 -04:00
Michael Klishin 8c00510157
Merge pull request #13891 from rabbitmq/mergify/bp/v4.1.x/pr-13890
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
CI: tweak OCI workflow trigger (backport #13890)
2025-05-14 06:02:23 +04:00
Michael Klishin 224a5785c9
Resolve a conflict #13890 #13891 2025-05-13 21:08:25 -04:00
Aitor Perez 82f7c4abc4 CI: tweak OCI build triggers
Building on push to any branch is wasteful and unnecessary, because most
of built images are never used. The workflow dispatch trigger covers the
use case to build an image from the latest commit in a branch.

The use case to validate/QA a PR is now covered by on pull request
trigger. This trigger has a caveat: PRs from forks won't produce a
docker image.

Why?
Because PRs from forks do not inject rabbitmq-server secrets. This is a
security mechanism from GitHub, to protect repository secrets.

With this trigger is possible to QA/validate PRs from other Core team
members. Technically, anyone with 'write' access to our repo to push
branches.

(cherry picked from commit 4efb3df39e)

# Conflicts:
#	.github/workflows/oci-make.yaml
2025-05-13 16:50:51 +00:00
Michael Davis 02268efa81
minor: Avoid flake in `rabbit_mgmt_http_health_checks_SUITE`
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
The `below_node_connection_limit_test` and `ready_to_serve_clients_test`
cases could possibly flake because `is_quorum_critical_single_node_test`
uses the channel manager in `rabbit_ct_client_helpers` to open a
connection. This can cause the line

     true = lists:all(fun(E) -> is_pid(E) end, Connections),

to fail to match. The last connection could have been rejected if the
channel manager kept its connection open, so instead of being a pid the
element would have been `{error, not_allowed}`.

With `rabbit_ct_client_helpers:close_channels_and_connection/2` we can
reset the connection manager and force it to close its connection.

This commit is backported from 314e4261fc
on main.
2025-05-13 10:55:02 -04:00
Michael Davis 87b63cbe22
Merge pull request #13889 from rabbitmq/mergify/bp/v4.1.x/pr-13888
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
2025-05-12 22:07:24 -04:00
Michael Davis df11551fd9 Remove connection counts and limits from public API health checks
Returning the connection limit and active count are not really necessary
for these checks. Instead of returning them in the response to the
health check we log a warning when the connection limit is exceeded.

(cherry picked from commit 3f53e0172d)
2025-05-13 00:43:00 +00:00
Michael Klishin a594ba8e1e
Merge pull request #13882 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/v4.1.x/dev-deps-dd1c27f4c1
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
[skip ci] Bump com.google.googlejavaformat:google-java-format from 1.26.0 to 1.27.0 in /deps/rabbit/test/amqp_jms_SUITE_data in the dev-deps group across 1 directory
2025-05-11 09:23:05 +04:00
dependabot[bot] 754fbf3778
[skip ci] Bump com.google.googlejavaformat:google-java-format
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.google.googlejavaformat:google-java-format](https://github.com/google/google-java-format).


Updates `com.google.googlejavaformat:google-java-format` from 1.26.0 to 1.27.0
- [Release notes](https://github.com/google/google-java-format/releases)
- [Commits](https://github.com/google/google-java-format/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: com.google.googlejavaformat:google-java-format
  dependency-version: 1.27.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-10 18:12:55 +00:00
Michael Klishin a1949381bf
Merge pull request #13880 from rabbitmq/mergify/bp/v4.1.x/pr-13879
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Add health checks for testing readiness to serve clients (backport #13879)
2025-05-09 23:52:44 +04:00
Michael Klishin 12ee638ce6
Merge pull request #13881 from rabbitmq/mergify/bp/v4.1.x/pr-13878
Wait until page is fully loaded (backport #13878)
2025-05-09 23:40:06 +04:00
Marcial Rosales f790bf3728 Wait until page is fully loaded
(cherry picked from commit f79c7229d5)
2025-05-09 18:47:45 +00:00
Michael Davis 9d02953ad7 Add a health check for testing readiness to serve clients
(cherry picked from commit 67bdc011cb)
2025-05-09 18:46:41 +00:00
Michael Davis a16cee0ac1 Add a health check for testing the node connection limit
(cherry picked from commit 028b69213e)
2025-05-09 18:46:41 +00:00
Michael Klishin b8045432f5
Merge pull request #13870 from rabbitmq/mergify/bp/v4.1.x/pr-13856
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Make empty CQ init faster in case of clean shutdown (backport #13856)
2025-05-09 02:08:22 +04:00
Michael Klishin cabe85ae0e
Merge pull request #13875 from rabbitmq/mergify/bp/v4.1.x/pr-13868
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Fix selenium issues when running two rabbitmq (backport #13868)
2025-05-08 22:41:14 +04:00
Michael Davis 6b71f776f4
Merge pull request #13876 from rabbitmq/mergify/bp/v4.1.x/pr-13872 2025-05-08 14:33:59 -04:00
Michael Davis 56cf8a094f Add an 'is-in-service' health check wrapping `rabbit:is_serving/0`
This is useful for a load balancer, for example, to be able to avoid
sending new connections to a node which is running and has listeners
bound to TCP ports but is being drained for maintenance.

(cherry picked from commit 07fe6307c6)
2025-05-08 17:45:55 +00:00
Marcial Rosales c306fd9e60 Exclude other_rabbitmq when running start-others. And fix some issues
(cherry picked from commit 81cf5f2e46)
2025-05-08 17:45:46 +00:00
Michael Klishin 7fa8fd9ee8
Merge pull request #13874 from rabbitmq/mergify/bp/v4.1.x/pr-13871
Allow multiple protocols in protocol listener health check (backport #13871)
2025-05-08 21:45:43 +04:00
Michael Davis abaa69751f Accept multiple protocols in protocol listener health check
This updates the health check for protocol listeners to accept a set of
protocols, comma-separated. The check only returns 200 OK when all
requested protocols have active listeners.

(cherry picked from commit 5d319be3f9)
2025-05-08 16:22:54 +00:00
Michael Davis 7d94c498ff Prefer node-local listeners helper in protocol-listener health check
This is a minor change that avoids a cluster-wide query for active
listeners. The old code called `rabbit_networking:active_listeners/0`
and then filtered the results by ones available on the local node. This
caused an RPC and concatenation of all other cluster members' listeners
and then in the next line filtered down to local nodes. Equivalently we
can use `rabbit_networking:node_listeners(node())` which dumps a local
ETS table.

This is not a very impactful change but it's nice to keep the latency of
the health-check handlers low and reduce some unnecessary cluster noise.

(cherry picked from commit 0d692fa161)
2025-05-08 16:22:54 +00:00
Péter Gömöri e6cbf50081 Make empty CQ init faster in case of clean shutdown
At CQ startup variable_queue went through each seqid from 0 to
next_seq_id looking for the first message even if there were no
messages in the queue (no segment files).

In case of a clean shutdown the value next_seq_id is stored in
recovery terms. This value can be utilized by the queue index to
provide better seqid bounds in absence of segment files.

Before this patch starting an empty classic queue with next_seq_id =
100_000_000 used to take about 26 seconds. With this patch it takes
less than 1ms.

(cherry picked from commit 150172f008)
2025-05-08 14:25:07 +00:00
Michael Klishin f806766513
Merge pull request #13867 from rabbitmq/mergify/bp/v4.1.x/pr-13861
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Move `file_handle_cache` and `vm_memory_monitor` back to `rabbit` (backport #13861)
2025-05-07 23:43:06 +04:00
Jean-Sébastien Pédron bf01548a25 Move `file_handle_cache` and `vm_memory_monitor` back to `rabbit`
[Why]
They were moved from `rabbit` to `rabbit_common` several years ago to
solve an dependency issue because `amqp_client` depended on the file
handle cache. This is not the case anymore.

[How]
The modules are moved back to `rabbit`.

`rabbit_common` doesn't need to depend on `os_mon` anymore. `rabbit`
already depends on it, so no changes needed here.

`include/rabbit_memory.hrl` and some test cases are moved as well to
follow the `vm_memory_monitor` module.

(cherry picked from commit e58eb1807a)
2025-05-07 18:00:18 +00:00
Michael Klishin 6c4677e1b5
Merge pull request #13866 from rabbitmq/mergify/bp/v4.1.x/pr-13848
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Add several functions to mgt-api.js for wsr testing with selenium (backport #13848)
2025-05-07 21:54:02 +04:00
Marcial Rosales 5b2d021f15 Add functions to mgt-api for selenium
(cherry picked from commit ea0dd8beb8)
2025-05-07 16:00:11 +00:00
Michael Klishin 41e5426703
Merge pull request #13862 from rabbitmq/mergify/bp/v4.1.x/pr-13857
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Fix partition index conflict in stream SAC coordinator (backport #13857)
2025-05-07 09:01:54 +04:00
Arnaud Cogoluègnes bcf1a5b69c Fix partition index conflict in stream SAC coordinator
Consumers with a same name, consuming from the same stream should have
the same partition index. This commit adds a check to enforce this rule
and make the subscription fail if it does not comply.

Fixes #13835

(cherry picked from commit cad8b70ee8)
2025-05-06 15:17:23 +00:00
Michael Klishin 0aeca40416
Merge pull request #13860 from rabbitmq/mergify/bp/v4.1.x/pr-13858
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
STOMP: confirm utf-8 handling (backport #13858)
2025-05-06 18:53:14 +04:00
Iliia Khaprov 0d284b0ec2 STOMP: confirm utf-8 handling
(cherry picked from commit 0ec25997b6)
2025-05-06 14:15:00 +00:00
Michael Klishin 1b7d66808a
Merge pull request #13855 from rabbitmq/mergify/bp/v4.1.x/pr-13850
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
STOMP: queue type tests - add queue.type assertions (backport #13850)
2025-05-05 23:36:26 +04:00
Michael Klishin e569855eee
Merge pull request #13854 from rabbitmq/mergify/bp/v4.1.x/pr-13837
Modify default queue type injection logic (backport #13837)
2025-05-05 22:49:34 +04:00
Iliia Khaprov 24e873db0c STOMP: queue type tests - add queue.type assertions
(cherry picked from commit a91371dfe6)
2025-05-05 17:33:16 +00:00
Michael Klishin 963e2c670a
Merge pull request #13852 from rabbitmq/mergify/bp/v4.1.x/pr-13836
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 26) (push) Waiting to run Details
Test (make) / Build and Xref (1.17, 27) (push) Waiting to run Details
Test (make) / Test (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Waiting to run Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Waiting to run Details
Test (make) / Type check (1.17, 27) (push) Waiting to run Details
Management UI: new page and elements for superstreams (partitioned streams) (backport #13836)
2025-05-05 21:28:25 +04:00
Michal Kuratczyk 6549254b45 Add a test for DQT upon vhost creation
(cherry picked from commit f61b9d9bf4)
2025-05-05 17:21:13 +00:00
Michal Kuratczyk 01433f4017 Set the DQT in rabbit_vhost:do_add
(cherry picked from commit 9bd11b449f)
2025-05-05 17:21:13 +00:00
Michal Kuratczyk d072f43dcb Add DQT to vhost metadata on recovery
Vhosts that currently don't have their own default queue type, now
inherit it from the node configuration and store it in their metadata
going forward.

(cherry picked from commit 9d0f01b45b)
2025-05-05 17:21:12 +00:00
Michal Kuratczyk bededaa194 Adjust tests to the new behaviour
(cherry picked from commit 0e743b5fe7)
2025-05-05 17:21:12 +00:00
Michal Kuratczyk 4932d2e1d9 vhost inherits DQT from node
Rather than injecting node-level DQT when exporting definitions,
inject it into vhost's metadata when a vhost is created.

(cherry picked from commit 3c95bf32e7)
2025-05-05 17:21:12 +00:00
Michal Kuratczyk 09b31f6e4c Remove vhost.default_queue_type from HTTP defs export
(cherry picked from commit 5eb65f5f72)
2025-05-05 17:21:12 +00:00
Michal Kuratczyk f8f0046fff Fix DQT in definition export (redundant property)
The correct place for the `default_queue_type` property
is inside the `metadata` block. However, right now we'd
always export the value outside of `metadata` AND only
export it inside `metadata`, if it was not `undefined`.

This value outside of `metadata` was just misleading:
if a user exported the definitins from a fresh node,
changed `classic` to `quorum` and imported such modified
values, the DQT would still be `classic`, because RMQ looks
for the value inside `metadata`. Just to make it more confusing,
if the DQT was changed successfully one way or another, the
value outside of `metadata` would reflect that
(it always shows the correct value, but is ignored on import).

(cherry picked from commit 73da2a3fbb)
2025-05-05 17:21:11 +00:00
Diana Parra Corbacho fac2a318c1 Mgmt UI: Add super streams page
(cherry picked from commit ef09b190ce)
2025-05-05 16:35:02 +00:00
Michael Klishin 4703c1c3b6
Merge pull request #13847 from rabbitmq/mergify/bp/v4.1.x/pr-13843
Trigger a 4.1.x alpha release build / trigger_alpha_build (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 26) (push) Has been cancelled Details
Test (make) / Build and Xref (1.17, 27) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, khepri) (push) Has been cancelled Details
Test (make) / Test mixed clusters (1.17, 27, mnesia) (push) Has been cancelled Details
Test (make) / Type check (1.17, 27) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Launch another rabbitmq server from a Selenium test suite (backport #13843)
2025-05-03 19:53:02 +04:00
Michael Klishin fc350e4221
4.1.0 release notes edits
(cherry picked from commit c458cba923)
2025-05-03 11:48:52 -04:00
Michael Klishin b5682a50e9
Minor 4.1.0 release notes correction
(cherry picked from commit 6bda6a610f)
2025-05-03 11:48:44 -04:00
Michael Klishin 01d520fdcb
Resolve a conflict #13843 #13847 2025-05-03 11:09:50 -04:00
Marcial Rosales 816cf8a993 Fix test
it was necessary to add a queue first before checking which
columns are available

(cherry picked from commit 7653b6522a)

# Conflicts:
#	selenium/test/queuesAndStreams/list.js
2025-05-03 14:38:04 +00:00
Marcial Rosales e5e80efbef Fix location of definitions file
(cherry picked from commit fa315e4d86)
2025-05-03 14:38:03 +00:00