jtao15 commented on code in PR #8667:
URL: https://github.com/apache/pinot/pull/8667#discussion_r869721248
##########
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:
This should not happen? Currently retention manager will clean up
`IN_PROGRESS` lineage entries after 24 hours. Usually the retention period
should be > 24 hours.
Say we have segments in `ERROR` state for the segmentsFrom, we probably want
to fix the segments first before reverting the entry.
--
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]