-
Notifications
You must be signed in to change notification settings - Fork 4k
QQ: exclude delivery_limit from policy repair comparison. #14458
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
Conversation
As it cannot be updated as part of a policy when it is disabled (-1) it needs to be excluded from comparison
is it only when it is disabled (-1) that it cannot be updated from a policy? I really did not investigate thoroughly to find out what prevents the disabled delivery limit to be changed by a policy but this code part seems to allow it https://github.com/rabbitmq/rabbitmq-server/blob/v4.2.0-beta.2/deps/rabbit/src/rabbit_fifo.erl#L227. isn't to problem of continuous update_config that rabbit_fifo converts a negative delivery limit to
I will shortly link a commit to show what I mean. (Sorry I just came back from vacation and couldn't look at this issue earlier) |
yes good point, this will probably disable "valid" repairs. that said with the defaulting logic I feel it is probably safest to exclude this key irrespectively. |
This change f855eb5 prevents update_config every tick if delivery-limit is negative, but still allows the periodic check to detect when delivery-limit is changed via policy. What do you think? |
yes I think this is fine - do we need the |
Not necessarily. Just wanted to highlight that the conversion is necessary only for the comparison, for the actual config update it does not matter. I will add tests and submit a PR early next week. |
I have been doing some testing and your change allows the delivery_limit to be disable after it has been active, this didn't use to be the case and was a deliberate choice. We could ofc extract the delivery_limit key in the comparison and compare them using adjusted logic but I'm not convinced it is worth it. Especially as we are probably going to make some adjustments to deliver limit defaulting once we introduce Ra v3 (Which is better able to cope with repeated returns). |
thanks for testing and looking Karl. Don't want to delay the fix for #14202 so I'm fine with merging your PR which has well understood behaviour. To continue the discussion do you mean it is not allowed to disable after active on main or by your PR? My change (especially with the |
yes I think just removing the key from comparison is fine for now, Once we ship Ra v3 (with log compaction) the restrictions on delivery limits may well be lifted and we will start allowing unlimited returns to the queue (potentially). So we can keep it simple for now even if it means that we'd not repair the case where only the delivery limit has changed. |
QQ: exclude delivery_limit from policy repair comparison. (backport #14458)
As it cannot be updated as part of a policy when it is disabled (-1)
it needs to be excluded from comparison
Fixes #14202