mcvsubbu commented on a change in pull request #6778:
URL: https://github.com/apache/incubator-pinot/pull/6778#discussion_r637039208



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java
##########
@@ -1214,4 +1273,112 @@ private int 
getMaxNumPartitionsPerInstance(InstancePartitions instancePartitions
       return (numPartitions + numInstancesPerReplicaGroup - 1) / 
numInstancesPerReplicaGroup;
     }
   }
+
+  // Pre fetch the LLC segment without deep store copy.
+  public void prefetchLLCSegmentWithoutDeepStoreCopy(String tableNameWithType) 
{
+      TableType tableType = 
TableNameBuilder.getTableTypeFromTableName(tableNameWithType);
+      if (tableType == TableType.REALTIME) {
+        TableConfig tableConfig = 
_helixResourceManager.getTableConfig(tableNameWithType);
+        if (tableConfig == null) {
+          LOGGER.warn("Failed to find table config for table: {}", 
tableNameWithType);
+          return;
+        }
+
+        PartitionLevelStreamConfig streamConfig = new 
PartitionLevelStreamConfig(tableConfig.getTableName(),
+            IngestionConfigUtils.getStreamConfigMap(tableConfig));
+        if (!streamConfig.hasLowLevelConsumerType()) {
+          return;
+        }
+
+        List<LLCRealtimeSegmentZKMetadata> segmentZKMetadataList = 
ZKMetadataProvider.getLLCRealtimeSegmentZKMetadataListForTable(_propertyStore, 
tableNameWithType);

Review comment:
       I believe I had suggested an alternative here.
   
   When controller comes up (or gains mastership for a table), scan all tables 
for segments missing ini deep store. Keep the list of missing segments in 
memory.
   
   Whenever job is triggered, pull missing segment list from memory. If the 
upload succeeds, delete the segment from memory list.
   
   Whenever a deepstore upload fails (recognized during commit), add segment to 
in-memory list.




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



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

Reply via email to