Skip to content
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 queue declaration failures in Khepri minority (backport #11980) (backport #12019) #12020

Merged
merged 4 commits into from
Aug 15, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 15, 2024

This fixes a case-clause crash in the logs in cluster_minority_SUITE. When the database is not available rabbit_amqqueue:declare/6,7 should return a protocol_error record with an error message rather than a hard crash. Also included in this change is the necessary changes to typespecs: rabbit_db_queue:create_or_get/1 is the first function to return a possible {error,timeout}. That bubbles up through rabbit_amqqueue:internal_declare/3 and must be handled in each rabbit_queue_type:declare/2 callback.


This is an automatic backport of pull request #11980 done by Mergify.
This is an automatic backport of pull request #12019 done by Mergify.

The clause of the spec that allowed passing a list of queue name
resources is out of date: the guard prevents a list from ever matching.

(cherry picked from commit d3752c4)
(cherry picked from commit bb5fda6)
`rabbit_misc:rs/1` for a queue resource will print
`queue '<QName>' in vhost '<VHostName>'` so the "a queue" and
surrounding single quotes should be removed here.

(cherry picked from commit f60a9b5)
(cherry picked from commit 246e8fa)
This fixes a case-clause crash in the logs in `cluster_minority_SUITE`.
When the database is not available `rabbit_amqqueue:declare/6,7` should
return a `protocol_error` record with an error message rather than a
hard crash. Also included in this change is the necessary changes to
typespecs: `rabbit_db_queue:create_or_get/1` is the first function to
return a possible `{error,timeout}`. That bubbles up through
`rabbit_amqqueue:internal_declare/3` and must be handled in each
`rabbit_queue_type:declare/2` callback.

(cherry picked from commit 8889d40)
(cherry picked from commit 1d0e840)
(cherry picked from commit 8eef209)
(cherry picked from commit 1cd66e8)
@michaelklishin michaelklishin added this to the 3.13.7 milestone Aug 15, 2024
@the-mikedavis the-mikedavis merged commit dfae1e3 into v3.13.x Aug 15, 2024
188 checks passed
@the-mikedavis the-mikedavis deleted the mergify/bp/v3.13.x/pr-12019 branch August 15, 2024 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants