Skip to content

Add user limits. #962

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

Merged
merged 11 commits into from
Apr 23, 2025
Merged

Add user limits. #962

merged 11 commits into from
Apr 23, 2025

Conversation

MirahImage
Copy link
Member

This closes #960

Summary Of Changes

Adds optional Limits for connections and channels to the user spec.

@MirahImage MirahImage mentioned this pull request Mar 18, 2025
@MirahImage MirahImage force-pushed the user-limits branch 5 times, most recently from 03deb30 to 70e1239 Compare March 19, 2025 15:34
@Zerpet Zerpet added this to the v1.17.0 milestone Mar 27, 2025
@MirahImage MirahImage force-pushed the user-limits branch 2 times, most recently from e2e9c07 to 5fcebac Compare April 4, 2025 14:21
@MirahImage MirahImage marked this pull request as ready for review April 4, 2025 14:59
@MirahImage MirahImage requested a review from Zerpet April 4, 2025 14:59
@MirahImage MirahImage requested review from mkuratczyk and ansd April 14, 2025 16:27
Copy link
Member

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious about clearing the user limits. It looks like (I haven't tried) if a user limit is set, and then the UserLimits field is set to an empty struct, the declare logic would simply ignore the limits, because the zero value of int32 is 0 and our logic ignores any values equal or below zero.

One option would be to set the UserLimit field as a pointer, so that we can differentiate between the zero value and not set at all (nil). Note that 0 for limits is a valid value in RabbitMQ.

@MirahImage
Copy link
Member Author

@Zerpet it now handles the 0 and negative cases, as well as the change of limits.

@MirahImage MirahImage merged commit 86a012a into main Apr 23, 2025
7 checks passed
@MirahImage MirahImage deleted the user-limits branch April 23, 2025 15:09
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.

User limits max-connections
3 participants