-
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 database timeouts from Khepri minority #10915
base: main
Are you sure you want to change the base?
Commits on May 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 572ec51 - Browse repository at this point
Copy the full SHA 572ec51View commit details -
Configuration menu - View commit details
-
Copy full SHA for b8d8a21 - Browse repository at this point
Copy the full SHA b8d8a21View commit details -
Improve cluster_minority_SUITE
This is a mix of a few changes: * Suppress the compiler warning from the export_all attribute. * Lower Khepri's command handling timeout value. By default this is set to 30s in rabbit which makes each of the cases in `client_operations` take an excessively long time. Before this change the suite took around 10 minutes to complete. Now it takes between two and three minutes. * Swap the order of client and broker teardown steps in end_per_group hook. The client teardown steps will always fail if run after the broker teardown steps because they rely on a value in `Config` that is deleted by broker teardown.
Configuration menu - View commit details
-
Copy full SHA for d3832f7 - Browse repository at this point
Copy the full SHA d3832f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e1d785f - Browse repository at this point
Copy the full SHA e1d785fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3fbad38 - Browse repository at this point
Copy the full SHA 3fbad38View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45fb884 - Browse repository at this point
Copy the full SHA 45fb884View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08572d9 - Browse repository at this point
Copy the full SHA 08572d9View commit details -
rabbit_db_queue: Transactionally delete transient queues from Khepri
The prior code skirted transactions because the filter function might cause Khepri to call itself. We want to use the same idea as the old code - get all queues, filter them, then delete them - but we want to perform the deletion in a transaction and fail the transaction if any queues changed since we read them. This fixes a bug - that the call to `delete_in_khepri/2` could return an error tuple that would be improperly recognized as `Deletions` - but should also make deleting transient queues atomic and fast. Each call to `delete_in_khepri/2` needed to wait on Ra to replicate because the deletion is an individual command sent from one process. Performing all deletions at once means we only need to wait for one command to be replicated across the cluster. We also bubble up any errors to delete now rather than storing them as deletions. This fixes a crash that occurs on node down when Khepri is in a minority.
Configuration menu - View commit details
-
Copy full SHA for b1ee0ce - Browse repository at this point
Copy the full SHA b1ee0ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0232bce - Browse repository at this point
Copy the full SHA 0232bceView commit details -
minor: Correct outdated spec for rabbit_amqqueue:lookup/1
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.
Configuration menu - View commit details
-
Copy full SHA for 5fce957 - Browse repository at this point
Copy the full SHA 5fce957View commit details -
rabbit_db_queue: Bubble up errors in set_many/1 with Khepri enabled
Previously a failing transaction would go unnoticed. Now we return an error tuple.
Configuration menu - View commit details
-
Copy full SHA for bed8267 - Browse repository at this point
Copy the full SHA bed8267View commit details -
rabbit_db_user: Raise instead of 'khepri_tx:abort/1'
`khepri_tx:abort/1` is only meant for use within a transaction - I assume this was a relic of implementing this function with a transaction previously. The only caller already wraps this function in a `try`/`catch` block that logs the error and re-raises.
Configuration menu - View commit details
-
Copy full SHA for b8494be - Browse repository at this point
Copy the full SHA b8494beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ece1bf - Browse repository at this point
Copy the full SHA 6ece1bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for e804034 - Browse repository at this point
Copy the full SHA e804034View commit details -
rabbit_db_exchange: Raise database errors in next_serial/1
All callers assume that this operation will succeed.
Configuration menu - View commit details
-
Copy full SHA for f0567ee - Browse repository at this point
Copy the full SHA f0567eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for e81b064 - Browse repository at this point
Copy the full SHA e81b064View commit details -
rabbit_db_exchange: Raise Khepri errors instead of throwing in clear/0
This function is only used by the test suites. A backtrace should make the thrown error clearer though.
Configuration menu - View commit details
-
Copy full SHA for 1a6489f - Browse repository at this point
Copy the full SHA 1a6489fView commit details -
rabbit_db_vhost: Declare no-return in create_or_get/3 spec
Note that we don't refactor the `throw/1` to an `erlang:error/1` since it's caught by `rabbit_vhost:add/3`.
Configuration menu - View commit details
-
Copy full SHA for f069001 - Browse repository at this point
Copy the full SHA f069001View commit details -
Configuration menu - View commit details
-
Copy full SHA for d45cda6 - Browse repository at this point
Copy the full SHA d45cda6View commit details -
rabbit_db_vhost: Bubble up database errors in clear/0
This function is only used by a test suite which matches on the 'ok' return.
Configuration menu - View commit details
-
Copy full SHA for ba55fbb - Browse repository at this point
Copy the full SHA ba55fbbView commit details -
Configuration menu - View commit details
-
Copy full SHA for be6644e - Browse repository at this point
Copy the full SHA be6644eView commit details -
Configuration menu - View commit details
-
Copy full SHA for ca55031 - Browse repository at this point
Copy the full SHA ca55031View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6add459 - Browse repository at this point
Copy the full SHA 6add459View commit details