Commit Graph

187 Commits

Author SHA1 Message Date
Michael Klishin b6098de245 Bump Cuttlefish to 3.4.0 2024-08-06 18:24:07 -04:00
Michael Klishin af67afe090 Bump Cuttlefish to 3.3.0 2024-08-05 22:32:21 -04:00
Karl Nilsson 5c0384a328 Ra v2.13.5
This restores the previous pre-init behaviour where an invalid server
will not stop the Ra system from starting. Instead it will log the
errors and continue.

This ensures compatibility with upgraded older systems and systems
where there are historical discrepancies between what is in the
ra_directory and actually on disk.
2024-07-23 15:13:50 +01:00
Michael Klishin f1b52880bb Bump Ra to 2.13.4 2024-07-22 11:00:51 -04:00
Karl Nilsson 42991f7838 Ra v2.13.3
This contains a fix in the ra_directory module to ensure
names can be deleted even when a Ra server has never been started
during the current node lifetime.

Also contains a small tweak to ensure the ra_directory:unregister_name
is called before deleting a Ra data directory which is less likely
to cause a corrupt state that will stop a Ra system from starting.
2024-07-19 18:47:27 +01:00
Karl Nilsson b225fb97ad Ra 2.13.2
This contains an important bugfix to an issue introduced in
2.11.0 where a segment writer may crash during recovery.
2024-07-19 12:40:48 +01:00
Karl Nilsson c0c6029938 Ra 2.13.1
This release contains improvements to the checkpointing feature
needed for quorum queues v4 and the following fixes:

* Add read to file:open/2 options in ra_lib:sync_file/1
* Emit the new local_query tuple only if query options are set
* bug fixes for checkpoints
2024-07-15 15:08:35 +01:00
Jean-Sébastien Pédron e9da930f59
Bump Khepri from 0.13.0 to 0.14.0
Release notes:
https://github.com/rabbitmq/khepri/releases/tag/v0.14.0

While here, bump khepri_mnesia_migration from 0.4.0 to 0.5.0 as well.
2024-07-10 16:07:43 -04:00
Loïc Hoguin 13025a3ba2
make: Experimental erlang.mk implementing beam cache
The beam cache allows switching between app and test
builds without having to rebuild everything. Since
the files keep their mtime and other attributes,
rebuilding continues from where it was left off
before, and only the relevant files get rebuilt
if anything changed.
2024-06-29 17:15:32 +02:00
Loïc Hoguin a64d1e67fc
Remove looking_glass
It has largely been superseded by `perf`. It is no longer
generally useful. It can always be added to BUILD_DEPS for
the rare cases it is needed, or installed locally and
pointed to by setting its path to ERL_LIBS.
2024-06-26 09:56:46 +02:00
Loïc Hoguin 31310d2315
make: Simplify looking for DEPS_DIR
With the monorepo the dependencies are either correct
or are the parent directory (when we are in a rabbit
application in deps/).
2024-06-24 14:06:46 +02:00
Karl Nilsson fdaef55213 Ra v2.11.0
This release includes a new machine API `snapshot_installed/2`. This new
API will only be used indirectly through khepri.

This release also includes an performance improvement that reduces the chances
of building a large WAL mailbox backlog when a node is low on scheduling
resources and commands are committed by followers completing writes to disk
before the leader.

There is also a fix for a potential election deadlock.
2024-06-17 15:43:12 +01:00
Loïc Hoguin 1535e730de
make: Don't immediately expand PROJECT_VERSION
When there is nothing to do we don't need this variable
so we don't want to calculate it unnecessarily.

Because this variable is only used once, when
producing the .app file, we don't have to worry
about the calculation being done multiple times.
If we ever do then it will need to be lazily
evaluated[1] instead.

[1] Managing Projects with GNU Make, 3rd Edition Chapter 10

Execution speed differences:

  make -C deps/rabbit nope  0,02s user 0,03s system 101% cpu 0,051 total
  make -C deps/rabbit nope  0,02s user 0,01s system 97% cpu 0,031 total
2024-06-10 09:42:32 +02:00
Michal Kuratczyk 65cbe5d2f3
Switch to upstream Jose
We had to fork it for Thoas support
but it's been merged a long time ago
https://github.com/potatosalad/erlang-jose/pull/126
2024-06-03 08:51:38 +02:00
Karl Nilsson 5123680a17 QQ: default to compressed mem tables and set a wal max entries default
Compressed ETS tables may introduce a small throughput penalty (low single
digit %) but can reduce peak Ra memory use by 30-50%.

Also set a default wal_max_entries value to avoid mem tables growing
too large when using very small message sizes (as more than 1M tiny
messages can easily fit into one WAL file).

Ra 2.10.1 has a type spec fix needed.
2024-05-09 14:24:22 +01:00
Michael Klishin 8cb86ca65d Make: move seshat dep definition to rabbitmq-components.mk 2024-05-09 02:17:41 -04:00
Michael Klishin ef3888220a
jose dependency belongs to rabbitmq-components.mk
and not oauth2_client or the OAuth 2 plugin.

Pair: Rin Kuryloski
2024-05-06 12:17:19 -04:00
Karl Nilsson 5b2da75b5e Ra 2.10.0
This Ra release contains a number of fixes and improvements including:

* Much improved resiliency when Ra infrastructure such as the WAL or
segment writer encounters unexpected errors during disk operations.

It also includes the following features that are RabbitMQ does not
yet make use of (but will in the near future).

* Checkpoints: allow non truncating snapshots to be written
to allow faster recovery of quorum queues with long backlogs for example.
* Server recovery strategy configuration: allow dynamically started
ra servers to be optionally restarted.
* New handle_aux/5 callback with a better and safer API
2024-04-29 11:41:57 +01:00
Rin Kuryloski 6d845c570c Add dep_gen_batch_server to rabbitmq-components.mk
Follow up to #11016
2024-04-16 17:39:21 +02:00
Michael Davis b83efd414b
Bump Khepri to v0.13.0
Khepri v0.13.0 contains a fix for how projections are handled during
registration and recovery. The error returned from
`khepri:register_projection/1,2,3` has also been updated to use the
`?khepri_error(..)` helper macro.

Co-authored-by: Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr>
2024-03-28 10:13:05 -04:00
Loïc Hoguin 6005883576
Update Cowboy to 2.12.0
And Cowlib to 2.13.0 as a dependency of Cowboy 2.12.0.
2024-03-14 17:09:24 +01:00
Jean-Sébastien Pédron 2aa7e92818
Bump Khepri from 0.12.0 to 0.12.1
Release notes:
https://github.com/rabbitmq/khepri/releases/tag/v0.12.1
2024-02-21 11:34:53 +01:00
Michael Klishin c57e790261
Merge pull request #10012 from rabbitmq/create-oauth2-client-multi-resource
OAuth 2: support multiple resources, extract an OAuth 2 client
2024-02-12 10:33:01 -05:00
Jean-Sébastien Pédron 53139ce99c
Bump Khepri from 0.11.0 to 0.12.0
... and khepri_mnesia_migration from 0.3.0 to 0.4.0.

Release notes:
* Khepri: https://github.com/rabbitmq/khepri/releases/tag/v0.12.0
* khepri_mnesia_migration: https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.4.0
2024-02-12 15:01:18 +01:00
Marcial Rosales d827b72ce1 Create Oauth2 client 2024-02-10 20:12:04 +01:00
Karl Nilsson 2df3fc16aa Ra 2.9.1
This Ra release contains fixes for leaderboard updates as well
as a long standing bug fix that meant the latest cluster may not
be recovered correctly after an unclean shutdown.
2024-02-09 14:42:44 +00:00
Jean-Sébastien Pédron d5624d976f
Bump khepri_mnesia_migration from 0.2.1 to 0.3.0
Release notes:
https://github.com/rabbitmq/khepri_mnesia_migration/releases/tag/v0.3.0
2024-01-31 19:12:27 +01:00
Jean-Sébastien Pédron d8abd3ac2b
Bump Khepri from 0.10.0 to 0.11.0
Release notes:
https://github.com/rabbitmq/khepri/releases/tag/v0.11.0
2024-01-31 19:12:27 +01:00
Jean-Sébastien Pédron 967533967e
Bump Ra from 2.7.1 to 2.7.3
Release notes:
* https://github.com/rabbitmq/ra/releases/tag/v2.7.2
* https://github.com/rabbitmq/ra/releases/tag/v2.7.3
2024-01-31 19:12:23 +01:00
Loïc Hoguin 865bc22fb8
Update Cowboy to 2.11 2024-01-29 16:27:59 +01:00
Jean-Sébastien Pédron 369bbfbf92
rabbitmq-components.mk: Declare `dep_rabbitmq_prelaunch`
[Why]
This might be needed after the move of `rabbitmq_prelaunch` from
`deps/rabbit/apps` to `deps`.
2024-01-17 16:26:47 +01:00
Karl Nilsson e9317bd31e Ra v2.7.1
Includes:

Update to aten 0.6.0 which includes a double notification fix and
use of monotonic time instead of system time.
2024-01-03 14:21:54 +00:00
Michael Klishin 54ae40692a
Merge pull request #9656 from cloudamqp/prometheus_escape_label
Escape prometheus core metric label values
2023-12-20 19:28:53 -05:00
Michael Davis dea4769fed
Update khepri to 0.10.1
Khepri 0.10.0 replaces `khepri:wait_for_async_ret/2,3` with
`khepri:handle_async_ret/1,2`. This will be used by the child commit:
the child commit will use Khepri's async interface and handle async
write events from Ra.

Changes to the bazel build files were done automatically with gazelle:

    bazel run gazelle -- update-repos --verbose \
        --build_files_dir=bazel github.com/rabbitmq/khepri@v0.10.1
2023-12-12 12:01:59 -05:00
Péter Gömöri 8c787609de Bump prometheus dependency to 4.11.0 2023-12-03 01:14:44 +01:00
Jean-Sébastien Pédron af0bce1764
Upgrade khepri_mnesia_migration from 0.1.1 to 0.2.1 2023-10-27 16:08:43 +02:00
Rin Kuryloski ac1e6cc1cb Add khepri dep to rabbitmq_consistent_hash_exchange in Make 2023-10-16 16:20:18 +02:00
Karl Nilsson 882e0c1749 Ra 2.7.0
This includes a new ra:key_metrics/1 API that is more available
than parsing the output of sys:get_status/1.

the rabbit_quorum_queue:status/1 function has been ported to use
this API instead as well as now inludes a few new fields.
2023-09-28 11:46:39 -04:00
Michal Kuratczyk 805f6793cc
Ra 2.6.3
Improved long log recovery:
faster and lower memory usage.

more info:
https://github.com/rabbitmq/ra/pull/385
2023-07-13 16:46:35 +02:00
Karl Nilsson 84f43bc8f1 Ra 2.6.2
Includes minor fixes and improvements such as:

* Don't overwrite Ra member config file in place to avoid potential
corruption scenario
* Make logging unicode compatible
* Optimisation to avoid spawning node connector process on ra member init
when nodes are already connected.
* Catch recovery failures in the Ra WAL rather than crashing hard.
2023-06-19 14:45:20 +01:00
Rin Kuryloski 27e8fa8c96 Use the new branch name for looking_glass 2023-05-26 15:08:18 +02:00
Luke Bakken 349e0a5040
Move dep_credentials_obfuscation to rabbitmq-components.mk
Potential fix for publishing to hex.pm
2023-05-22 13:10:30 -07:00
Michael Klishin c9c6730cc5 Pin Ra to 2.6.1 2023-05-12 01:48:47 +04:00
Michael Klishin 441a77f6d0 Pin Ra to 2.6.0-pre.1 2023-05-11 23:25:58 +04:00
Loïc Hoguin e6e68fcb0b
Update Cowboy to 2.10.0 for OTP-26
We already were using Cowlib 2.12.1 and therefore were
compatible with OTP-26. This simply updates Cowboy to
the version that depends on Cowlib 2.12.1.
2023-04-28 15:34:12 +02:00
Arnaud Cogoluègnes 70af1c4607
Merge pull request #7827 from rabbitmq/qq-return-crash
Quorum queues: avoid potential crash when returning message.
2023-04-05 16:56:55 +02:00
Arnaud Cogoluègnes cdf4ec5944
Use Ra 2.5.1 2023-04-05 15:37:20 +02:00
Karl Nilsson 01f6d0fc19 Quorum queues: avoid potential crash when returning message.
Returns reaching a Ra member that used to be leader but now has stepped
down would cause that follower to crash and restart.

This commit avoids this scenario as well as giving the return commands
a good chance of being resent to the new leader in a timeley manner.
(see the Ra release for this).
2023-04-04 16:02:26 +01:00
Loïc Hoguin 31a84183e5
Update Cowlib to 2.12.1
This fixes a compilation error with OTP-26.
2023-04-04 09:19:00 +02:00
Karl Nilsson 36c2417bac Ra 2.5.0
This Ra release includes improvements to Ra server GC behaviour when receiving a lot
of low priority commands with large binary payloads (e.g. quorum queue messages).

Practically this allows quorum queues to accept large amounts of messages in a more predicatble and performant manner.

This change also removes ra_file_handle cache that was used as a bridge between ra file operations and RabbitMQ io metrics. Lots of components in RabbitMQ such as streams and CQv2s do not record io metrics in the previous manner due to overhead incurred for every file io operation. These metrics are better inspected at the OS level anyway.
2023-03-09 14:20:21 +00:00