tarun11Mavani commented on code in PR #17352:
URL: https://github.com/apache/pinot/pull/17352#discussion_r2626984461


##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompactmerge/UpsertCompactMergeTaskGenerator.java:
##########
@@ -286,7 +292,17 @@ public static SegmentSelectionResult 
processValidDocIdsMetadata(String tableName
         continue;
       }
       SegmentZKMetadata segment = candidateSegmentsMap.get(segmentName);
-      for (ValidDocIdsMetadataInfo validDocIdsMetadata : 
validDocIdsMetadataInfoMap.get(segmentName)) {
+      List<ValidDocIdsMetadataInfo> replicaMetadataList = 
validDocIdsMetadataInfoMap.get(segmentName);
+
+      // Check consensus across all replicas before proceeding with any 
operations
+      if (!hasValidDocConsensus(segmentName, replicaMetadataList)) {

Review Comment:
   We do this check in controller and immediately fire the delete call for 
selected segments. Since this is happening inside the same method, chances of a 
server restart and segment coming up with non-zero validDocIds between this 
period is very very low. 



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