-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Improve rabbit_backing_queue:is_duplicate behaviour #12913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
`is_duplicate` callback signature was changed in order to support both the mirroring queues as well as the de-duplication ones. As the mirroring queues are now deprecated and removed, we can fall back to a simpler boolean as return value. Signed-off-by: Matteo Cafasso <[email protected]>
@noxdafox thank you. I will re-submit so that Actions can run with access to all the secrets. |
Voilà: #12914. I have asked a couple of team members to review this and the feasibility of a backport to |
The CI is very red with #12914. I've tried to set up deduplication but queues fail with a
Messages are initially delivered to the queue but then the queue crashes. |
Hello, I run local tests for both priority and classic queues and did not spot any issue. The plugin is not yet supporting the new function signature, this is why you see it failing with a Could you point me out the problematic CI tests which I should look at? |
The deduplication plugin is not needed for things to go wrong. I just start RMQ from a branch with your changes, start perf-test as described above and the queues crashes after a few seconds. I don't have the plugin installed/enabled for this at all. You can see a lot of tests failing here: https://github.com/rabbitmq/rabbitmq-server/actions/runs/12265974908/job/34232064015?pr=12914. I didn't even look into this - with classic queues crashing, obviously a lot of tests will fail |
Thanks for the pointer, I will look into those and fix the issues. EDIT: indeed the issue is clear, a bit surprised local tests did not catch it. I will fix it this evening. |
As the de-duplication plugin is the only adopter of the `is_duplicate` callback, we now use a simpler signature. When a message is deemed duplicated, we discard it and re-route it to dead letter exchange. Signed-off-by: Matteo Cafasso <[email protected]>
ae739cc
to
f93baa3
Compare
@mkuratczyk I updated the PR with the relevant fixes. I ran the following tests which are now passing
Before I limited myself to classic and priority queues thinking they were sufficing. |
Re-submitted as #12921, running a few relevant suites locally now. |
#12921 CI results are much better. I am now running a few suites related to queues/streams but not mentioned above locally just in case: # from deps/rabbit
gmake ct-per_vhost_queue_limit
gmake ct-queue_master_location
gmake ct-rabbit_stream_queue
gmake ct-amqqueue_backward_compatibility
gmake ct-unit_priority_queue
gmake ct-classic_queue_prop |
Yup, the CI is green and I don't see any issues. Deduplication plugin seems to work with these changes, at least for some basic functionality. |
The plugin will be built against the new implementation. I am unsure we can easily guarantee backwards compatibility as the signature change is affecting the return value and not the callback parameters but I'll see what I can do. Are test suites documented anywhere or is there a simple way to discover them? It was a bit hard to figure out what to run. Running the whole test suite is usually prone to fail early with unrelated issues. Hence, it's a bit hard to figure out if the submitted code works or not. |
I don't think there's anything documented or discoverable. There has been a lot of effort lately to speed up the tests and fix the flaky tests so things should not just fail for unrelated reasons (it still happens but it's rare). For us, the easiest way is to push a branch and let the CI run all the tests but this doesn't currently work for external contributions unfortunately. |
@noxdafox see |
There were some Actions build environment changes that we need to address first before we can backport this potentially risky change to |
#12921 was merged for |
Proposed Changes
The
rabbit_backing_queue:is_duplicate
callback was modified in PR 1774 in order to support both the de-duplication plugin and the mirroring queues.Since implementation of mirroring queues has been removed, the only user for the
is_duplicate
callback remains the de-duplication plugin. Hence, this PR simplifies the callback signature removing dead code.Neither the classic variable nor the priority queues are making use of the
is_duplicate
callback.On top of that, in the event the message is deemed duplicated, it is re-routed to DLX if present. This would satisfy issue noxdafox/rabbitmq-message-deduplication#106 on the plugin itself.
Types of Changes
What types of changes does your code introduce to this project?
Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply.You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.
CONTRIBUTING.md
document