Skip to content

Handle timeouts possible in Khepri minority in rabbit_db_binding (backport #11685) (backport #11784) #11786

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

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 22, 2024

These changes are split off of #10915 - I'd like to approach these changes incrementally and work through each module so that the diff is readable. This PR covers rabbit_db_binding: create/2 and delete/2 may return {error, timeout} when Khepri is in a minority and this PR updates the direct and indirect callers so that the error is handled gracefully.


This is an automatic backport of pull request #11685 done by Mergify.
This is an automatic backport of pull request #11784 done by Mergify.

(cherry picked from commit aace1b5)
(cherry picked from commit 53ddec4)
This is essentially a cosmetic change. Read-only transactions are done
with queries in Khepri rather than commands, like read-write
transactions. Local queries cannot timeout like commands so marking the
transaction as 'ro' means that we don't need to handle a potential
'{error, timeout}' return.

(cherry picked from commit fe28028)
(cherry picked from commit 703fa38)
This ensures that the call graph of `rabbit_db_binding:create/2` and
`rabbit_db_binding:delete/2` handle the `{error, timeout}` error
possible when Khepri is in a minority.

(cherry picked from commit f1be7ba)
(cherry picked from commit f4d2452)
This refactor is pulled from
<https://redirect.github.com/rabbitmq/rabbitmq-server/pull/10559>,
necessary for the error message when adding/deleting a binding fails.
@the-mikedavis the-mikedavis merged commit c928915 into v3.13.x Jul 23, 2024
188 checks passed
@the-mikedavis the-mikedavis deleted the mergify/bp/v3.13.x/pr-11784 branch July 23, 2024 12:33
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.

1 participant