jtao15 commented on code in PR #8667:
URL: https://github.com/apache/pinot/pull/8667#discussion_r870745178


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -3381,19 +3384,40 @@ public void revertReplaceSegments(String 
tableNameWithType, String segmentLineag
         tableNameWithType, segmentLineageEntryId);
   }
 
-  private void updateSegmentLineageEntryToReverted(String tableNameWithType, 
SegmentLineage segmentLineage,
-      String segmentLineageEntryId, LineageEntry lineageEntry) {
+  private List<String> deleteOrUpdateSegmentLineageEntryToReverted(String 
tableNameWithType,
+      SegmentLineage segmentLineage, String segmentLineageEntryId, 
LineageEntry lineageEntry,
+      List<String> newSegments) {
     // Check that all segments from 'segmentsFrom' are in ONLINE state in the 
external view.
     Set<String> onlineSegments = 
getOnlineSegmentsFromExternalView(tableNameWithType);
     
Preconditions.checkArgument(onlineSegments.containsAll(lineageEntry.getSegmentsFrom()),
 String.format(

Review Comment:
   Right, we should have the check for `COMPLETED` entries but not 
`IN_PROGRESS` ones. Removed the check for 
`deleteOrUpdateSegmentLineageEntryToReverted()` because it's only used for 
`IN_PROGRESS` entries. Added the if condition to check the lineage entry status 
in `updateSegmentLineageEntryToReverted()`.



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