Do not compute checksums for quorum queues

Make use of https://github.com/rabbitmq/ra/pull/292

The new default will be to NOT compute CRC32 for quorum queue segments
and to NOT compute Adler32 for WAL to achieve better performance.

See https://github.com/rabbitmq/ra/pull/292#pullrequestreview-1013194678
for performance improvements.
This commit is contained in:
David Ansari 2022-07-06 12:23:15 +02:00
parent ecee532064
commit ceb5c72bbb
3 changed files with 20 additions and 1 deletions

View File

@ -2256,6 +2256,9 @@ end}.
end
}.
{mapping, "quorum_queue.compute_checksums", "rabbit.quorum_compute_checksums", [
{datatype, {enum, [true, false]}}]}.
% ===============================
% Validators
% ===============================

View File

@ -72,7 +72,12 @@ ensure_ra_system_started(RaSystem) ->
get_config(quorum_queues = RaSystem) ->
DefaultConfig = get_default_config(),
DefaultConfig#{name => RaSystem}; % names => ra_system:derive_names(quorum)
Checksums = application:get_env(rabbit, quorum_compute_checksums, false),
WalChecksums = application:get_env(rabbit, quorum_wal_compute_checksums, Checksums),
SegmentChecksums = application:get_env(rabbit, quorum_segment_compute_checksums, Checksums),
DefaultConfig#{name => RaSystem, % names => ra_system:derive_names(quorum)
wal_compute_checksums => WalChecksums,
segment_compute_checksums => SegmentChecksums};
get_config(coordination = RaSystem) ->
DefaultConfig = get_default_config(),
CoordDataDir = filename:join(

View File

@ -812,5 +812,16 @@ credential_validator.regexp = ^abc\\d+",
{classic_queue_default_version_invalid,
"classic_queue.default_version = 3",
[],
[]},
%%
%% Quorum queue
%%
{quorum_queue_compute_checksums,
"quorum_queue.compute_checksums = true",
[{rabbit, [
{quorum_compute_checksums, true}
]}],
[]}
].