WIP: Add per-queue-type disk limits #14086
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an extension of the idea of the free disk space alarm. That option enables blocking publishers when the free disk space on the data dir's disk falls below some threshold. This feature blocks publishers of individual queue types when the disk space taken by the queue type exceeds the configured threshold.
This change is incomplete: it only affects QQs and streams and AMQP 0-9-1 so far. I thought I'd open this as a draft early though to hear if anyone has thoughts on this as a feature.
How to demo the changes...
make run-broker RABBITMQ_CONFIG_FILE=example.conf
rabbit_queue_type_disk_monitor:start_link()
(should become part of a sup tree eventually)perf-test -qq -u qq -x 1 -y 1 --rate 5 --confirm 5
perf-test -sq -u sq -x 1 -y 1 --rate 5 --confirm 5
cd /tmp/rabbitmq-test-instances/<node>/mnesia/<node>/quorum/<node>/
dd if=/dev/zero of=ballast.bin bs=1G count=3
rm ballast.bin
and the QQ perf-test command should continue