You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/12/13 19:13:49 UTC

[GitHub] [druid] zachjsh commented on a change in pull request #12052: Lock count guardrail for parallel single phase/sequential task

zachjsh commented on a change in pull request #12052:
URL: https://github.com/apache/druid/pull/12052#discussion_r768046445



##########
File path: indexing-service/src/main/java/org/apache/druid/indexing/common/task/AbstractBatchIndexTask.java
##########
@@ -413,6 +420,10 @@ protected boolean tryTimeChunkLock(TaskActionClient client, List<Interval> inter
       if (lock.isRevoked()) {
         throw new ISE(StringUtils.format("Lock for interval [%s] was revoked.", cur));
       }
+      locksAcquired++;
+      if (maxAllowedLockCount >= 0 && locksAcquired > maxAllowedLockCount) {

Review comment:
       Should we move this above where we submit request for lock, and check against current count + 1? At this point, I think we would have exceeded the maxCount by 1?




-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org