Skip to content
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

Have minimum queue TTL take effect for quorum queues #10949

Merged
merged 1 commit into from
May 16, 2024
Merged

Have minimum queue TTL take effect for quorum queues #10949

merged 1 commit into from
May 16, 2024

Conversation

ansd
Copy link
Member

@ansd ansd commented Apr 9, 2024

For classic queues, if both policy and queue argument are set for queue TTL, the minimum takes effect.

Prior to this commit, for quorum queues if both policy and queue argument are set for queue TTL, the policy always overrides the queue argument.

This commit brings the quorum queue queue TTL resolution to classic queue's behaviour. This allows developers to provide a custom lower queue TTL while the operator policy acts an upper bound safe-guard.

@ansd ansd marked this pull request as draft April 9, 2024 10:55
@michaelklishin michaelklishin added this to the 4.0.0 milestone Apr 9, 2024
@michaelklishin
Copy link
Member

This is also consistent with how the regular policy vs. operator policy tie break works for limits such as TTL and queue length limits: the lower (and safer w.r.t. resource use) wins.

@ansd
Copy link
Member Author

ansd commented Apr 9, 2024

merge_policy_value(<<"expires">>, Val, OpVal) -> min(Val, OpVal);

For classic queues, if both policy and queue argument are set
for queue TTL, the minimum takes effect.

Prior to this commit, for quorum queues if both policy and
queue argument are set for queue TTL, the policy always overrides the
queue argument.

This commit brings the quorum queue queue TTL resolution to classic
queue's behaviour. This allows developers to provide a custom lower
queue TTL while the operator policy acts an upper bound safe-guard.
@ansd ansd marked this pull request as ready for review May 16, 2024 13:54
@ansd ansd merged commit e8c5d22 into main May 16, 2024
18 checks passed
@ansd ansd deleted the qq-expires branch May 16, 2024 15:41
@ansd
Copy link
Member Author

ansd commented Aug 21, 2024

We can ship this PR only in 4.0 because it could otherwise come as a surprise to existing client applications which rely on today's 3.13 behaviour and therefore deleting quorum queues earlier than expected.
That's why backporting this PR to v3.13.x branch is too risky and a breaking change.

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.

2 participants