jon-wei commented on a change in pull request #7547: Add support minor 
compaction with segment locking
URL: https://github.com/apache/incubator-druid/pull/7547#discussion_r297881239
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java
 ##########
 @@ -387,79 +411,33 @@ SegmentIdWithShardSpec allocateNewSegment(DateTime 
timestamp) throws IOException
   {
     final String dataSource = getDataSource();
     final GranularitySpec granularitySpec = 
getIngestionSchema().getDataSchema().getGranularitySpec();
-    final Optional<SortedSet<Interval>> bucketIntervals = 
granularitySpec.bucketIntervals();
-
     // List locks whenever allocating a new segment because locks might be 
revoked and no longer valid.
-    final List<TaskLock> locks = toolbox
+    final Map<Interval, String> versions = toolbox
         .getTaskActionClient()
-        .submit(new LockListAction());
-    final TaskLock revokedLock = 
locks.stream().filter(TaskLock::isRevoked).findAny().orElse(null);
-    if (revokedLock != null) {
-      throw new ISE("Lock revoked: [%s]", revokedLock);
-    }
-    final Map<Interval, String> versions = locks
+        .submit(new LockListAction())
         .stream()
         .collect(Collectors.toMap(TaskLock::getInterval, 
TaskLock::getVersion));
 
-    Interval interval;
-    String version;
-    boolean justLockedInterval = false;
-    if (bucketIntervals.isPresent()) {
 
 Review comment:
   Hm, I don't think I understand why this block is being removed, can you 
clarify? I think this is still handling the time chunk locking case?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to