Commit Graph

59372 Commits

Author SHA1 Message Date
Marcial Rosales a8b4b4848a Fix issue 2025-06-05 08:25:05 +02:00
Marcial Rosales 3b0e70c094 Skip inteval 2025-06-04 17:41:11 +02:00
Marcial Rosales 89806f4a9d WIP Include consumer(s) to basic queue data
So that when stats are disabled, users can
still monitor queues' consumers
2025-06-04 17:06:08 +02:00
Marcial Rosales efba7cecd3 Add suite 2025-06-04 13:36:03 +02:00
Michael Klishin f7a238a8f4
Merge pull request #13981 from rabbitmq/selenium-test-mqtt-queue
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions 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
Management UI: fix MQTT qos0 queue [type] rendering
2025-06-03 19:16:24 +04:00
David Ansari 3f6211cda1 Address review of PR #13996 2025-06-03 16:33:14 +02:00
Marcial Rosales cc86ffe30a
Fix issue around rendering a mqtt qos0 queue 2025-06-03 16:40:55 +04:00
Michael Klishin 8e78c102c6
Merge pull request #14017 from rabbitmq/ci/tweak-selenium-triggers
Adjust triggers for Selenium workflow
2025-06-03 16:38:26 +04:00
D Corbacho 63df5f0945
Merge pull request #14018 from rabbitmq/fix-error-handling-in-mirrored_supervisor
mirrored_supervisor: Rework error handling after a failed update
2025-06-03 14:30:17 +02:00
Jean-Sébastien Pédron 376dd2ca60
mirrored_supervisor: Rework error handling after a failed update
[Why]
The retry logic I added in 4621fe7730
was completely wrong. If Khepri reached its own timeout of 30 seconds (as
of this writing), the mirrored supervisor would retry 50 times because
it would not check the time spent. This means it would retry for 25
minutes. Nice.

That retry would be terminated forcefully by the parent supervisor after
5 minutes if it was part of a shutdown.

[How]
This time, the code simply pass the error (timeout or something else)
down to the following `case`. It will shut the mirrored supervisor down.

This fixes very long RabbitMQ node termination (at least 5 minutes,
sometimes more) in testsuites. An example to reproduce:

    gmake -C deps/rabbitmq_mqtt \
      RABBITMQ_METADATA_STORE=khepri \
      ct-v5 t=cluster_size_3:session_takeover_v3_v5

In this one, the third node of the cluster will take 5+ minutes to stop.
2025-06-03 12:23:18 +02:00
Aitor Perez 40fcc1cdf3
ci: fix indentation in selenium workflow
From #14014, we learned that the indentation was causing workflows to
not trigger. However, this did not seem to affect when the workflow file
itself was changed. In any case, YAML is sensible to indentation,
therefore this change is 'correct'. Removing single quotes from paths
with '*' at the end, because it is not required according to YAML and
GitHub documentation.

The path triggers now match the Selenium workflow that runs on commits
to main and release branches.
2025-06-03 11:03:46 +01:00
Michael Klishin f882a28c71
Merge pull request #13996 from rabbitmq/issue-13785
Trigger a 4.2.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
MQTT: disconnect consumer when queue is deleted
2025-06-03 08:51:19 +04:00
Michael Klishin b48ab7246d
Revert "REVERT try ubuntu 22.04"
This reverts commit 5a0260440539a7e350d410f8f046164d582cd7f0.
2025-06-03 00:40:04 +04:00
Diana Parra Corbacho 610c83867e
REVERT try ubuntu 22.04 2025-06-03 00:40:04 +04:00
Diana Parra Corbacho d91c9d61d4
web_mqtt: propagate notify_consumer_quorum/qos0_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
Michael Klishin 9eaa22066b
web_mqtt: propagate notify_consumer_classic_queue_deleted to mqtt_shared_SUITE 2025-06-03 00:40:04 +04:00
Diana Parra Corbacho bf468bdd52
MQTT: disconnect consumer when queue is deleted
Queues are automatically declared for MQTT consumers, but they can be externally
deleted. The consumer should be disconnected in such case, because it has no way
of knowing this happened - from its perspective there are simply no messages to consume.

In RabbitMQ 3.11 the consumer was disconnected in such situation.
This behaviour changed with native MQTT, which doesn't use AMQP internally.
2025-06-03 00:40:04 +04:00
Michael Klishin 2b2e4d4716
Merge pull request #14000 from rabbitmq/test-sac-with-priorities
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions 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 SAC with priority consumers
2025-06-03 00:38:00 +04:00
Michael Klishin 8b7067d999
Merge branch 'main' into test-sac-with-priorities 2025-06-02 23:48:36 +04:00
Michael Klishin 797e54330b
Merge pull request #14007 from rabbitmq/backpressure-flake
Remove AMQP backpressure test expectation
2025-06-02 23:00:12 +04:00
David Ansari 0c391a52d3 Remove AMQP backpressure test expectation
Test case `tcp_back_pressure_rabbitmq_internal_flow_quorum_queue` succeeds
consistently locally on macOS and fails consistently in CI since 30 May
2025.

CI also shows a test failure instance of `tcp_back_pressure_rabbitmq_internal_flow_classic_queue`, albeit much rearer.

This test case succeeds in CI when using ubuntu-22.04 but fails with ubuntu-24.04.
Even before 30 May 2025, ubuntu-24.04 was used. However the GitHub runner
version was updated from Version: 20250511.1.0 to Version: 20250527.1.0
which presumably started to cause this test to fail.
This hypothesis cannot be validated because the GitHub actions
definitions YAML file doesn't provide a means to configure this version.

File `images/ubuntu/Ubuntu2404-Readme.md` in https://github.com/actions/runner-images/compare/ubuntu24/20250511.1...ubuntu24/20250527.1 shows the diff.
The most notable changes are probably the kernel version change from Kernel Version: 6.11.0-1013-azure to Kernel Version: 6.11.0-1015-azure and some changes to file `images/ubuntu/scripts/build/configure-environment.sh`

There seem to be no RabbitMQ related changes causing this test to fail
because this test also fails with an older RabbitMQ version with the new runner
Version: 20250527.1.0.

Neither `meck` nor `inet:setopts(Socket, [{active, once}])` cause the
test failure because the test also fails with the former
`erlang:suspend_process/1` and `erlang:resume_process/1`.

The test fails due to the following timeout in the writer proc on the
server:
```
** Last message in was {'$gen_cast',
                           {send_command,<0.760.0>,0,
                               {'v1_0.transfer',
                                   {uint,3},
                                   {uint,2211},
                                   {binary,<<0,0,8,162>>},
                                   {uint,0},
                                   true,undefined,undefined,undefined,
                                   undefined,undefined,undefined},
                               <<"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">>}}
** When Server state == #{pending => 3510,socket => #Port<0.49>,
                          reader => <0.755.0>,
                          monitored_sessions => [<0.760.0>],
                          pending_size => 3510}
** Reason for termination ==
** {{writer,send_failed,timeout},
    [{rabbit_amqp_writer,flush,1,
                         [{file,"src/rabbit_amqp_writer.erl"},{line,250}]},
     {rabbit_amqp_writer,handle_cast,2,
                         [{file,"src/rabbit_amqp_writer.erl"},{line,106}]},
     {gen_server,try_handle_cast,3,[{file,"gen_server.erl"},{line,2371}]},
     {gen_server,handle_msg,6,[{file,"gen_server.erl"},{line,2433}]},
     {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,329}]}]}
```

For unknown reasons, even after the CT test case resumes consumption,
the server still times out writing to the socket.

The most important test expectation that is kept in place is that the
server won't send all the messages if the client can't receive fast
enough.
2025-06-02 19:35:35 +02:00
Michael Klishin e19d2b0163
Merge pull request #13941 from rabbitmq/feature-13894
Oauth2: Support variable expansion when checking resource access
2025-06-02 21:30:49 +04:00
Michael Klishin 50c095d25a
Merge pull request #14003 from rabbitmq/fix-federation
Trigger a 4.2.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
Federation: move ETS initialisation to supervisor
2025-06-02 18:29:20 +04:00
Marcial Rosales bd037a1699 Verify previous active consumer is waiting 2025-06-02 15:38:49 +02:00
Diana Parra Corbacho 6ccdd9ce80 Federation: move ETS initialisation to supervisor
Events can be received after the boot step but before the application
is started. Creating the ETS in the supervisor solves this, as it is
started just before the event handler is installed.
2025-06-02 15:30:02 +02:00
Michael Klishin 034ef2c99c
Merge pull request #13999 from rabbitmq/mk-pass-in-tls-certificate-password-as-a-function
TLS listener startup: wrap private key password option into a function
2025-06-02 16:32:48 +04:00
Michael Klishin 67ee867a7c
Improve rabbit_ssl:wrap_password_opt/1 tests 2025-06-02 15:25:42 +04:00
Michael Klishin 9931386f05
Add unit_rabbit_ssl to CT parallel set 1A 2025-06-02 15:21:53 +04:00
Michael Klishin 30c32ee502
Use rabbit_ssl:wrap_password_opt in relevant places
We do it at the latest possible moment to not break
encrypted value support in 'rabbitmq.conf' files.

See #13998 for context.

Closes #13958.
2025-06-02 15:18:35 +04:00
Michael Klishin 08a74dadd9
Merge pull request #13994 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/dev-deps-507952ce20
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 Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
2025-06-01 11:24:00 +04:00
Michael Klishin dbf62b20ca
Merge pull request #13995 from rabbitmq/dependabot/maven/deps/rabbit/test/amqp_jms_SUITE_data/main/prod-deps-6214df9cac
[skip ci] Bump the prod-deps group across 4 directories with 1 update
2025-06-01 11:23:46 +04:00
dependabot[bot] 506d670b80
[skip ci] Bump the prod-deps group across 4 directories with 1 update
Bumps the prod-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).
Bumps the prod-deps group with 1 update in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [com.diffplug.spotless:spotless-maven-plugin](https://github.com/diffplug/spotless).


Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

Updates `com.diffplug.spotless:spotless-maven-plugin` from 2.44.4 to 2.44.5
- [Release notes](https://github.com/diffplug/spotless/releases)
- [Changelog](https://github.com/diffplug/spotless/blob/main/CHANGES.md)
- [Commits](https://github.com/diffplug/spotless/compare/maven/2.44.4...maven/2.44.5)

---
updated-dependencies:
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
  dependency-version: 2.44.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: prod-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-31 19:01:01 +00:00
dependabot[bot] a0cec40783
[skip ci] Bump the dev-deps group across 5 directories with 3 updates
Bumps the dev-deps group with 1 update in the /deps/rabbit/test/amqp_jms_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot directory: [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 1 update in the /deps/rabbitmq_mqtt/test/java_SUITE_data directory: [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream/test/rabbit_stream_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).
Bumps the dev-deps group with 2 updates in the /deps/rabbitmq_stream_management/test/http_SUITE_data directory: [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) and [org.junit.jupiter:junit-jupiter-params](https://github.com/junit-team/junit5).


Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-engine` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

Updates `org.junit.jupiter:junit-jupiter-params` from 5.12.2 to 5.13.0
- [Release notes](https://github.com/junit-team/junit5/releases)
- [Commits](https://github.com/junit-team/junit5/compare/r5.12.2...r5.13.0)

---
updated-dependencies:
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-engine
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev-deps
- dependency-name: org.junit.jupiter:junit-jupiter-params
  dependency-version: 5.13.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-31 19:00:08 +00:00
Loïc Hoguin 0278980ba0
CQ shared store: Delete from index on remove or roll over (#13959)
Trigger a 4.2.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
It was expensive to delete files because we had clean up
the index and to get the messages in the file we have to
scan it.

Instead of cleaning up the index on file delete this
commit deletes from the index as soon as possible.
There are two scenarios: messages that are removed
from the current write file, and messages that are
removed from other files. In the latter case, we
can just delete the index entry on remove. For messages
in the current write file, we want to keep the entry
in case fanout is used, because we don't want to write
the fanout message multiple times if we can avoid it.
So we keep track of removes in the current write file
and do a cleanup of these entries on file roll over.

Compared to the previous implementation we will no
longer increase the ref_count of messages that are
not in the current write file, meaning we may do more
writes in fanout scenarios. But at the same time the
file delete operation is much cheaper.

Additionally, we prioritise delete calls in rabbit_msg_store_gc.
Without that change, if the compaction was lagging behind,
we could have file deletion requests queued behind many compaction
requests, leading to many unnecessary compactions of files
that could already be deleted.

Co-authored-by: Michal Kuratczyk <michal.kuratczyk@broadcom.com>
2025-05-30 17:51:08 +02:00
Michael Klishin 795e66c663
Merge pull request #13979 from cloudamqp/tls-handshake-logging
Log TCP acceptor (Ranch) timeout and TLS [handshake-related] errors
2025-05-30 18:28:07 +04:00
Michael Klishin fb3b00e8e2
TLS listener startup: wrap private key password option into a function 2025-05-30 16:39:42 +04:00
LoisSotoLopez 2cdf6f8803
Merge branch 'main' into tls-handshake-logging 2025-05-30 11:45:24 +02:00
Lois Soto Lopez 3a5dc94eb4 Apply PR suggestions 2025-05-30 09:51:24 +02:00
Michael Klishin 8806e56fdd
Merge pull request #13977 from rabbitmq/fix-warning-formatting
Trigger a 4.2.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
[skip ci] Fix plugin version warning formatting
2025-05-29 18:08:33 +04:00
Lois Soto Lopez 94d93a84d3 Log ranch timeout and tls errors 2025-05-29 15:25:43 +02:00
Michal Kuratczyk b9c38560c1
[skip ci] Fix plugin version warning formatting
This doesn't fail the test, but shows up
as a end_per_testcase failure.

https://github.com/rabbitmq/rabbitmq-server/actions/runs/15322789846/job/43110071803?pr=13959
2025-05-29 14:23:34 +02:00
Marcial Rosales efcbde4f34 Add missing id tag 2025-05-29 09:27:26 +02:00
Marcial Rosales c73fdf79ff Remove log statement 2025-05-29 09:02:29 +02:00
Marcial Rosales 1d942027a9 Add system test for variable expansion 2025-05-29 09:02:29 +02:00
Marcial Rosales 0023ba2a01 Add var expansion to vhost and resource access 2025-05-29 09:02:29 +02:00
Michael Klishin b09e2f2dad
Merge pull request #13970 from rabbitmq/stream-plugin-emit-consumer-deleted
Trigger a 4.2.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 Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Has been cancelled Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Has been cancelled Details
Always emit consumer_deleted event when stream consumer goes away
2025-05-29 10:24:18 +04:00
Michael Klishin 3c4fc996e4
Merge pull request #13972 from rabbitmq/md/clear-auth-session-on-expiry
Clear management auth storage when redirecting to login
2025-05-29 09:57:24 +04:00
Michael Klishin e0a79f3f1e
Merge pull request #13963 from rabbitmq/selenium-use-var-over-tmp
Trigger a 4.2.x alpha release build / trigger_alpha_build (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Test Authentication/Authorization backends via mutiple messaging protocols / summary-selenium (push) Blocked by required conditions Details
Test Management UI with Selenium / selenium (chrome, 1.17.3, 27.3) (push) Waiting to run Details
Selenium: minor refactoring
2025-05-28 22:13:21 +04:00
Michael Davis 2a1b65df17
Clear management auth storage when redirecting to login
This branch redirects the client to the login page when the cookie
expires. To complete the logout process we should also clear any auth
data stored in local storage: local storage has no built-in expiration
mechanism.

To test this locally you can use `make run-broker`, set the session
timeout to one minute for quick testing:

    application:set_env(rabbitmq_management, login_session_timeout, 1)

go to the management page (`http://localhost:15672/#/`), login with
default credentials and wait a minute. After this change the local
storage only contains info like `rabbitmq.vhost` and `rabbitmq.version`.
2025-05-28 12:42:53 -04:00
Arnaud Cogoluègnes 52c89ab7a3
Always emit consumer_deleted event when stream consumer goes away
Not only when it is removed explicitly by the client. This is necessary
to make sure the consumer record is removed from the management ETS
tables (consumer_stats) and to avoid ghost consumers.

For other protocols like AMQP 091, the consumer_status ETS table is
cleaned up when a channel goes down, but there is no channel concept in
the stream protocol.

This is not consistent with other protocols or queue implementations
(which emits the event only on explicit consumer cancellation)
but is necessary to clean up stats correctly.

References #13092
2025-05-28 17:10:50 +02:00