-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Handle generic data structures in priority queue info callback #1669
Conversation
The priority queue implementation makes assumptions over the data format returned by the underlying backing queue `info` callback. This causes priority queues to crash if used together with other modules implementing the `rabbit_backing_queue` behaviour and returning additional data with the `info` callback. As we cannot predict the format of the data the backing queue `info` callback could return, we just replace it with the undefined keyword. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
@noxdafox Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
Thank you! |
Hi @noxdafox - do you have an example of a crash with a stack trace or a set of steps to reproduce a crash? |
Hello @lukebakken, you can find the stack trace and the steps to reproduce it in the issue I linked in the comment above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that's the correct way to handle the problem. The This implies that any implementation of the behaviour is supposed to keep that into account. Nevertheless, the We can in fact imagine what would happen if there would be more than one or two implementations of the A better solution would indeed consist in defining a data format for the I am open towards such design and willing to commit to it. But I'd rather not delve into the |
@noxdafox good enough explanation for me. |
The priority queue implementation makes assumptions over the
data format returned by the underlying backing queue
info
callback.This causes priority queues to crash if used together with other
modules implementing the
rabbit_backing_queue
behaviour andreturning additional data with the
info
callback.As we cannot predict the format of the data the backing queue
info
callback could return, we just replace it with the undefinedkeyword.
Signed-off-by: Matteo Cafasso noxdafox@gmail.com
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 creatingthe 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
documentFurther Comments
Notice this when investigating an issue in my plugin.
If a module implementing the
rabbit_backing_queue
behaviour wants to enrich the information returned by theinfo
callback (more particularly, the:backing_queue_status
information) will end up crashing the queue if used together with priorities.