Commit Graph

29759 Commits

Author SHA1 Message Date
Loïc Hoguin e947e098bd
make: Remove rabbitmq-deps.mk related targets 2024-08-29 15:19:14 +02:00
Loïc Hoguin 7e7e6feb9d
make: Remove rabbitmq-tests.mk
Everything in this file seems to be dead code except
ct-slow/ct-fast, which have been replaced by their
equivalent in the rabbit Makefile.
2024-08-29 15:19:13 +02:00
Michael Davis 5b3ae230b7
Merge pull request #12082 from rabbitmq/md/khepri/db-queue-deletion 2024-08-27 07:47:06 -05:00
David Ansari 55e6d582c4 Incrase default rabbit.max_link_credit
from 128 to 170. See comments for rationale.

On an Ubuntu box, run
```
quiver //host.docker.internal//queues/my-quorum-queue --durable --count 100k --duration 10m --body-size 12 --credit 10000
```

Before this commit:
```
RESULTS

Count ............................................... 100,000 messages
Duration ............................................... 11.0 seconds
Sender rate ........................................... 9,077 messages/s
Receiver rate ......................................... 9,097 messages/s
End-to-end rate ....................................... 9,066 messages/s
```

After this commit:
```
RESULTS

Count ............................................... 100,000 messages
Duration ................................................ 6.2 seconds
Sender rate .......................................... 16,215 messages/s
Receiver rate ........................................ 16,271 messages/s
End-to-end rate ...................................... 16,166 messages/s
```

That's because more `#enqueue{}` Ra commands can be batched before
fsyncing.

So, this commit brings the performance of scenario "a single connection publishing to
a quorum queue with large number (>200) of unconfirmed publishes" in AMQP 1.0
closer to AMQP 0.9.1.
2024-08-27 12:08:46 +02:00
David Ansari 314d4e2722 Unskip mixed version tests
As described in the 4.0 release notes:
> RabbitMQ Shovels will be able connect to a RabbitMQ 4.0 node via AMQP 1.0 only when the Shovel runs on a RabbitMQ node >= 3.13.7.
2024-08-26 10:37:30 +02:00
Michael Klishin 6b444ae907 Exclude this Khepri-specific test from mixed version cluster runs 2024-08-24 21:54:25 -04:00
Michael Klishin d7d1397d4b Update is_quorum_critical_test for #12133
Now the API endpoint can return Khepri as
a "queue" (or "stream") without the necessary
number of replicas online.

So don't expect the list to only have one element.
2024-08-24 21:25:29 -04:00
Michael Klishin f47daee915 Wording #12113 2024-08-24 19:07:09 -04:00
Michal Kuratczyk 6ca2022fcf await quorum+1 improvements
1. If khepri_db is enabled, rabbitmq_metadata is a critical component
2. When waiting for quorum+1, periodically log what doesn't have the
   quorum+1
   - for components: just list them
   - for queues: list how many we are waiting for and how to display
     them (because there could be a large number, logging that
     could be impractical or even dangerous)
3. make the tests signficantly faster by using a single group
2024-08-24 18:49:35 -04:00
Michael Klishin 96fc028352 Add a type spec 2024-08-24 18:25:44 -04:00
Michael Klishin 768b2f6925 Update HTTP API tests
This relaxes assert_list/2 assertion to
not require the size of an actually returned list element
to be exactly equal to the size of the expected one.

Sometimes it makes perfect sense to not assert on
every single key but only a subset, and with this
change, it now will be possible.

Individual tests may choose to assert on all
keys by listing them explicitly.
2024-08-24 14:50:37 -04:00
Michael Klishin c41c27de06 One more node-wide DQT test
References #11541 #11457 #11528
2024-08-24 05:50:20 -04:00
Michael Klishin 29051a8113 DQT: fall back to node-wide default
when virtual host does not have any metadata.

References #11541 #11457 #11528
2024-08-24 04:03:04 -04:00
Péter Gömöri 34bcb91159 Prevent exchange logging crash
Don't let the `log` callback of exchange_logging handler crash,
because in case of a crash OTP logger removes the exchange_logger
handler, which in turn deletes the log exchange and its bindings.

It was seen several times in production that the log exchange suddenly
disappears and without debug logging there is no trace of why.

With this commit `erlang:display` will print the reason and stacktrace
to stderr without using the logging infrastructure.
2024-08-23 00:28:10 +02:00
Michael Klishin 58d4e753ee
Merge pull request #12091 from rabbitmq/wal
Run with default wal_sync_method
2024-08-22 15:36:11 -04:00
Michael Klishin 5235b38156
Merge pull request #12095 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot/main/org.springframework.boot-spring-boot-starter-parent-3.3.3
Bump org.springframework.boot:spring-boot-starter-parent from 3.3.2 to 3.3.3 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot
2024-08-22 15:33:31 -04:00
Michael Klishin 0cab95a38d
Merge pull request #12094 from rabbitmq/dependabot/maven/deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin/main/org.springframework.boot-spring-boot-starter-parent-3.3.3
Bump org.springframework.boot:spring-boot-starter-parent from 3.3.2 to 3.3.3 in /deps/rabbitmq_auth_backend_http/examples/rabbitmq_auth_backend_spring_boot_kotlin
2024-08-22 15:32:03 -04:00
dependabot[bot] 8d86a9f77f
Bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 19:01:54 +00:00
dependabot[bot] bba1bc526f
Bump org.springframework.boot:spring-boot-starter-parent
Bumps [org.springframework.boot:spring-boot-starter-parent](https://github.com/spring-projects/spring-boot) from 3.3.2 to 3.3.3.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v3.3.2...v3.3.3)

---
updated-dependencies:
- dependency-name: org.springframework.boot:spring-boot-starter-parent
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 18:38:34 +00:00
dependabot[bot] e1130a491b
Bump kotlin.version
Bumps `kotlin.version` from 2.0.10 to 2.0.20.

Updates `org.jetbrains.kotlin:kotlin-test` from 2.0.10 to 2.0.20
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.10...v2.0.20)

Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 2.0.10 to 2.0.20

---
updated-dependencies:
- dependency-name: org.jetbrains.kotlin:kotlin-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 18:38:29 +00:00
Michael Klishin 9b6041d7f1
Merge pull request #12085 from rabbitmq/metadata_store_status-mnesia
Don't return khepri status when khperi_db is disabled
2024-08-22 13:30:20 -04:00
David Ansari ffefefba0f Run with default wal_sync_method
...which is `datasync`

RA never pre-allocates the WAL anymore unless explicitly configured to.
2024-08-22 16:24:07 +00:00
Michael Davis 4a8d01e79b
Handle rabbit_amqqueue:internal_delete/2 failures in quorum queues 2024-08-22 12:18:45 -04:00
Michael Davis 2302eb9a11
Handle rabbit_amqqueue:internal_delete/3 failures in classic queues
The design of `rabbit_amqqueue_process` makes this change challenging.
The old implementation of the handler of the `{delete,_,_,_}` command
simply stopped the process and any cleanup was done in `gen_server2`'s
`terminate` callback. This makes it impossible to pass any error back
to the caller if the record can't be deleted from the metadata store
before a timeout.

The strategy taken here slightly mirrors an existing
`{shutdown, missing_owner}` termination value which can be returned from
`init_it2/3`. We pass the `ReplyTo` for the call with the state. We then
optionally reply to this `ReplyTo` if it is set in `terminate_delete/4`
with the result of `rabbit_amqqueue:internal_delete/3`. So deletion of
a classic queue will terminate the process but may return an error to
the caller if the record can't be removed from the metadata store
before the timeout.
2024-08-22 12:17:44 -04:00
Michael Klishin 39679f58d9
Merge pull request #12073 from rabbitmq/osiris-1.8.3
Osiris v1.8.3
2024-08-22 12:17:37 -04:00
Jean-Sébastien Pédron 363cc8586c
rabbit_khepri: Set `default_ra_system` Khepri setting
[Why]
It allows to restart Khepri using `khepri:start()`, e.g. from a shell.
2024-08-22 12:18:19 +02:00
Michal Kuratczyk b48d4bf29a
Don't return khepri status when khperi_db is disabled
When khepri_db feature flag is disabled, Khepri servers
are running but are not clustered. In this case `rabbit_khepri:status/0`
shows that all nodes are leaders, which is confusing and scary
(even though actually harmless). Instead, we now just print that mnesia
is in use.
2024-08-22 11:01:46 +02:00
Michael Davis a7d099de8c
cluster_minority_SUITE: Add a case for queue deletion 2024-08-21 16:23:48 -04:00
Michael Davis 0bb203e769
rabbit_db_queue: Add timeout error to delete/2 spec 2024-08-21 16:23:48 -04:00
Michael Davis 9774d8d833
minor: Use rabbit_misc:rs/1 formatting for stream delete failure msg
`rabbit_misc:rs/1` formats a string "queue {name} in vhost {vhost}" so
the "queue" and single quotes in the prior message can be removed.
2024-08-21 15:21:26 -04:00
Michael Klishin 1795306f3f HTTP API: make sure virtual host limits are returned as a JSON object
when no limits are set.

This is the classic empty proplist JSON serialization
problem in a relatively new place.
2024-08-21 15:13:53 -04:00
Karl Nilsson baa64102fd Osiris v1.8.3
This release contains fixes around certain recovery failures where
there are either orphaned segment files (that do not have a corresponding
index file) or index files that do not have a corresponding segment
file.
2024-08-21 08:48:58 +01:00
Jean-Sébastien Pédron 36aa94a994
Merge pull request #12065 from rabbitmq/list-exchange-names-from-khepri-projection
rabbit_db_exchange: List exchange names from Khepri projection
2024-08-21 09:09:02 +02:00
Simon Unge 782823fd39 bazel fixes 2024-08-20 23:55:11 -04:00
Simon Unge 5189adf144 Add qq status to mgmt api 2024-08-20 23:55:11 -04:00
Michael Klishin f8f0d33aa7
Merge pull request #12035 from rabbitmq/stream-mgmt-queue-page-tweaks
Management: Add segment count to stream queue page
2024-08-20 23:03:22 -04:00
Michael Davis dce8135d30
Add test cases for the '--experimental' flag 2024-08-20 16:23:17 -04:00
Michael Davis dc611dd45c
Non-zero exit code for failing to enable an experimental feature flag
With the prior behavior it can be unclear whether the text was a warning
and the feature flag was enabled anyways. We can use a non-zero exit
code and the `{:error, code, text}` return value to make it clear that
the flag wasn't enabled.
2024-08-20 16:03:29 -04:00
Michael Davis f0c0cf8052
enable_feature_flag CLI: Fix typo in usage message 2024-08-20 15:25:20 -04:00
Jean-Sébastien Pédron 20f2850875
rabbit_db_exchange: List exchange names from Khepri projection
[Why]
All other queries are based on projections, not direct queries to
Khepri. Using projections for exchange names should be faster and more
consistent with the rest of the module.

[How]
The Khepri query is replaced by an ETS query.
2024-08-20 17:35:34 +02:00
David Ansari 1c6f4be308 Rename quorum queue priority from "low" to "normal"
Rename the two quorum queue priority levels from "low" and "high" to "normal" and
"high". This improves user experience because the default priority level is low /
normal. Prior to this commit users were confused why their messages show
up as low priority. Furthermore there is no need to consult the docs to
know whether the default priority level is low or high.
2024-08-20 11:18:36 +02:00
Michael Klishin ca81b9110c
Merge pull request #12057 from rabbitmq/dependabot/maven/deps/rabbitmq_mqtt/test/java_SUITE_data/main/org.apache.maven.plugins-maven-surefire-plugin-3.4.0
Bump org.apache.maven.plugins:maven-surefire-plugin from 3.3.1 to 3.4.0 in /deps/rabbitmq_mqtt/test/java_SUITE_data
2024-08-19 15:45:19 -04:00
Michael Klishin 24b4371a2a
Merge pull request #11998 from rabbitmq/experimental-ff-safeguards
Make it hard to accidentally enable an experimental feature flag
2024-08-19 15:45:05 -04:00
dependabot[bot] 8147006c6d
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.1...surefire-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 19:02:14 +00:00
dependabot[bot] 8c87c717ea
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.1...surefire-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 18:42:03 +00:00
dependabot[bot] 12db37a2b2
Bump org.apache.maven.plugins:maven-surefire-plugin
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.1...surefire-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-19 18:09:24 +00:00
Michal Kuratczyk 396ad7af1a Reject `--experimental all` 2024-08-19 13:41:37 -04:00
Michal Kuratczyk ddb117f810 `-f` -> `-e`; drop unneeded cases; typos
Also, remove the `undef` case which was only needed for
RabbitMQ 3.7 and older.
2024-08-19 13:41:37 -04:00
Michal Kuratczyk e3302f2f9a Rename --force to --experimental
Plus, a slightly more scary error message
2024-08-19 13:41:37 -04:00
Michal Kuratczyk 58e0c1600f Require --force to enable experimental FF 2024-08-19 13:41:37 -04:00