frankgh commented on code in PR #267:
URL: https://github.com/apache/cassandra-sidecar/pull/267#discussion_r2396166054


##########
server/src/main/java/org/apache/cassandra/sidecar/restore/RestoreJobDiscoverer.java:
##########
@@ -245,10 +244,11 @@ private void executeInternal()
         jobDiscoveryRecencyDays = Math.max(context.earliestInDays, 
restoreJobConfig.jobDiscoveryMinimumRecencyDays());
         LOGGER.info("Exit job discovery. " +
                     "inflightJobsCount={} " +
+                    "delay={} " +

Review Comment:
   you want to keep this one at info level?



##########
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:
   I assume we want the stacktrace here to have an idea where the issue is 
coming from.



-- 
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]

Reply via email to