-
Notifications
You must be signed in to change notification settings - Fork 705
Tests: KCL to retry reassignment request when clashing with partition balancer #26149
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
Tests: KCL to retry reassignment request when clashing with partition balancer #26149
Conversation
It's in the header, so it was probably intended to be implemented. With it implemented we can print any command key which is helpful for adding a debug print of all commands going through controller with their types and keys. We're probably miles away from being able to print all values.
We already classify cluster::errc::no_update_in_progress as error_code::no_reassignment_in_progress. This is to do similar for cluster::errc::update_in_progress. This error code is used in node joining, but it is handled there specifically.
We already have 3 similar handlers and looking to add one more. Separate repeated code.
partition balancer may kick in at any time, so this error should be handled gracefully
CI test resultstest results on build#66014
|
|
this should fix https://redpandadata.atlassian.net/browse/CORE-9958 |
bharathv
left a comment
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.
on "improvements" in release notes of this PR, I thought that is only reserved for user facing improvements? This is a test only change though.
| return False | ||
|
|
||
| # A concurrent reassignment may be triggered by partition_balancer | ||
| if has_partition_err(l, "REASSIGNMENT_IN_PROGRESS"): |
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'm wondering if the caller should handle the retry in this case. Reassignments are typically submitted with the assumption that the original assignment is still valid. However, the presence of a REASSIGNMENT_IN_PROGRESS status suggests that the original assignment may no longer apply, so it might be more appropriate for the caller to decide how to proceed.
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 thought reassignment specifies desired state, and if a concurrent reassignment has changed something the desired state still applies. WDYT?
No, we actually change the behaviour of Redpanda by returning a different error code. I think users should be prepared to it. |
duh! I totally missed that commit. 🙈 |
|
/backport v25.1.x v24.3.x v24.2.x |
|
/backport v25.1.x |
|
/backport v24.3.x |
|
/backport v24.2.x |
Sometimes explicitly requested partition reassignment will clash with a reassignment triggered by Partition Balancer. Retry in this case.
No backport as behaviour changes (more specific error code).
Backports Required
Release Notes
Improvements