Jackie-Jiang commented on code in PR #8667:
URL: https://github.com/apache/pinot/pull/8667#discussion_r869768041
##########
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:
I meant the segment retention instead of the lineage cleanup. IIRC we manage
segment retention and lineage cleanup separately, and the segments in
`segmentsFrom` might already expire.
In high level, when reverting an invalid `IN_PROGRESS` entry, we should not
check the `segmentsFrom` but always revert it. For `COMPLETED` entry, we should
check to ensure no data loss.
--
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]