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



##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseParallelIndexTaskRunner.java
##########
@@ -343,6 +344,11 @@ public SegmentIdWithShardSpec allocateNewSegment(
       interval = granularitySpec.getSegmentGranularity().bucket(timestamp);
       version = ParallelIndexSupervisorTask.findVersion(versions, interval);
       if (version == null) {
+        final int maxAllowedLockCount = 
getIngestionSchema().getTuningConfig().getMaxAllowedLockCount();
+        if (maxAllowedLockCount >= 0 && locks.size() == maxAllowedLockCount) {

Review comment:
       Would change to `locks.size() == maxAllowedLockCount` just for safety

##########
File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseParallelIndexTaskRunner.java
##########
@@ -343,6 +344,11 @@ public SegmentIdWithShardSpec allocateNewSegment(
       interval = granularitySpec.getSegmentGranularity().bucket(timestamp);
       version = ParallelIndexSupervisorTask.findVersion(versions, interval);
       if (version == null) {
+        final int maxAllowedLockCount = 
getIngestionSchema().getTuningConfig().getMaxAllowedLockCount();
+        if (maxAllowedLockCount >= 0 && locks.size() == maxAllowedLockCount) {

Review comment:
       Would change to `locks.size() >= maxAllowedLockCount` just for safety




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