yifan-c commented on code in PR #267:
URL: https://github.com/apache/cassandra-sidecar/pull/267#discussion_r2399604174
##########
server/src/main/java/org/apache/cassandra/sidecar/concurrent/ConcurrencyLimiter.java:
##########
@@ -95,7 +99,14 @@ public void releasePermit()
{
permits.updateAndGet(current -> {
int next = current - 1;
- return Math.max(next, 0);
+ if (next < 0)
+ {
+ // log a warning with stacktrace and reset the acquired
permits to 0
+ LOGGER.warn("Over-release detected!", new
IllegalStateException("ConcurrencyLimiter permits over-released"));
Review Comment:
yes
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]