Skip to content

Conversation

@mdayakar
Copy link
Contributor

@mdayakar mdayakar commented Nov 5, 2025

HIVE-27805: Hive server2 connections limits bug

What changes were proposed in this pull request?

When hive.server2.limit.connections.per.user/hive.server2.limit.connections.per.ipaddress/hive.server2.limit.connections.per.user.ipaddress properties are configured with some positive integer values then the session requests from same user/same ip/same user:ip are restricted to the value configured and these counts are getting increased while opening a session and getting decreased when the session is closed but if session creation/opening has some issues then these counts are not getting decreased which leads once the count reaches the configured value no sesions will be created for the same user/ip/user:ip even though there are no valid/active sessions. Now as a part of this PR, decreasing the count in all error scenarios when a session creation/opening fails.

Why are the changes needed?

To fix the issue mentioned in HIVE-27805

Does this PR introduce any user-facing change?

No

How was this patch tested?

Unit tests are added.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

@kasakrisz kasakrisz merged commit 52b6fc3 into apache:master Nov 7, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants