Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Draft
kjnilsson wants to merge 1 commit into main
base: main
Choose a base branch
Loading
from qq-policy-repair-fix

Conversation

Copy link
Contributor

@kjnilsson kjnilsson commented Aug 29, 2025
edited
Loading

As it cannot be updated as part of a policy when it is disabled (-1)
it needs to be excluded from comparison

Fixes #14202

As it cannot be updated as part of a policy when it is disabled (-1)
 it needs to be excluded from comparison
Copy link
Contributor

is it only when it is disabled (-1) that it cannot be updated from a policy?
can it be updated eg from 20 to 40? if it can then this change will prevent the periodic policy repair to notice such change?

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 undefined so when maybe_apply_policies compares current config with new config, the former contains undefined while the later contains a negative value for the same unchanged "disabled" delivery limit?

ShouldUpdate = NewPolicyConfig =/= CurrentPolicyConfig,

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)

Copy link
Contributor Author

is it only when it is disabled (-1) that it cannot be updated from a policy?
can it be updated eg from 20 to 40? if it can then this change will prevent the periodic policy repair to notice such change?

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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 IsQueueDeclaration guard?

Copy link
Contributor

do we need the not IsQueueDeclaration guard?

Not necessarily. Just wanted to highlight that the conversion is necessary only for the comparison, for the actual config update it does not matter.
Does this conversion (https://github.com/rabbitmq/rabbitmq-server/blob/v4.2.0-beta.2/deps/rabbit/src/rabbit_fifo.erl#L203-L205) still needed if the guard is removed and the fifo_client passes the disabled value as undefined? (I guess yes because of mixed version clusters or when applying older raft logs)

I will add tests and submit a PR early next week.

Copy link
Contributor Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
4.2.0
Development

Successfully merging this pull request may close these issues.

Quorum queue delivery count set to unlimited can cause the number segment files to increase without truncation

AltStyle によって変換されたページ (->オリジナル) /