gianm commented on a change in pull request #7203: Fix race in historical when 
loading segments in parallel
URL: https://github.com/apache/incubator-druid/pull/7203#discussion_r263497227
 
 

 ##########
 File path: server/src/main/java/org/apache/druid/server/SegmentManager.java
 ##########
 @@ -171,9 +167,16 @@ public boolean loadSegment(final DataSegment segment) 
throws SegmentLoadingExcep
           );
 
           if ((entry != null) && 
(entry.getChunk(segment.getShardSpec().getPartitionNum()) != null)) {
-            log.warn("Told to load a adapter for a segment[%s] that already 
exists", segment.getId());
+            log.warn("Told to load an adapter for segment[%s] that already 
exists", segment.getId());
             resultSupplier.set(false);
           } else {
+            final Segment adapter;
+            try {
+              adapter = getAdapter(segment);
+            }
+            catch (SegmentLoadingException e) {
 
 Review comment:
   SegmentLoadingException is specifically checked for in a few places that 
treat it differently from a generic runtime exception. Please keep it.

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