jtuglu-netflix commented on code in PR #18045:
URL: https://github.com/apache/druid/pull/18045#discussion_r2113316126
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java:
##########
@@ -768,7 +773,7 @@ public Long getWorkerIdleTaskSlotCount()
@Override
public Long getWorkerUsedTaskSlotCount()
{
- return (long) portFinder.findUsedPortCount();
+ return Math.max(usedTaskSlotCount.get(), 0);
Review Comment:
This is just for safety. There are [other
checks](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/overlord/ForkingTaskRunner.java#L770)
like it in the file as well. It might be even better to place the count within
`TaskStorageDirTracker`, considering this is already sychronized.
--
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]