sunithabeeram commented on a change in pull request #3942: Set 
processingException when all queried segments cannot be acquired
URL: https://github.com/apache/incubator-pinot/pull/3942#discussion_r266107271
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/executor/ServerQueryExecutorV1Impl.java
 ##########
 @@ -124,7 +125,22 @@ public DataTable processQuery(ServerQueryRequest 
queryRequest, ExecutorService e
 
     TableDataManager tableDataManager = 
_instanceDataManager.getTableDataManager(tableNameWithType);
     Preconditions.checkState(tableDataManager != null, "Failed to find data 
manager for table: " + tableNameWithType);
-    List<SegmentDataManager> segmentDataManagers = 
tableDataManager.acquireSegments(queryRequest.getSegmentsToQuery());
+
+    // acquire the segments
+    int missingSegments = 0;
+    List<String> segmentsToQuery = queryRequest.getSegmentsToQuery();
+    List<SegmentDataManager> segmentDataManagers = new ArrayList<>();
+    for (String segmentName : segmentsToQuery) {
+      SegmentDataManager segmentDataManager = 
tableDataManager.acquireSegment(segmentName);
+      if (segmentDataManager != null) {
+        segmentDataManagers.add(segmentDataManager);
+      } else {
+        if (!tableDataManager.isDeleted(segmentName)) {
 
 Review comment:
   Renamed.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to