You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "zhuyaogai (via GitHub)" <gi...@apache.org> on 2023/08/30 03:47:39 UTC
[GitHub] [kyuubi] zhuyaogai commented on a diff in pull request #5217: [KYUUBI #5216] Limit counter resource leak in SessionLimiter.
zhuyaogai commented on code in PR #5217:
URL: https://github.com/apache/kyuubi/pull/5217#discussion_r1309599612
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/session/SessionLimiter.scala:
##########
@@ -95,7 +95,10 @@ class SessionLimiterImpl(userLimit: Int, ipAddressLimit: Int, userIpAddressLimit
private def decrLimitCount(key: String): Unit = {
_counters.get(key) match {
- case count: AtomicInteger => count.decrementAndGet()
+ case count: AtomicInteger =>
+ if (count.decrementAndGet() < 0) {
+ count.incrementAndGet()
+ }
Review Comment:
@bowenliang123 hi, I have tried your suggestion, but tests failed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org