xiangfu0 commented on code in PR #18715:
URL: https://github.com/apache/pinot/pull/18715#discussion_r3380429616
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/generator/BaseTaskGenerator.java:
##########
@@ -180,9 +180,10 @@ public List<SegmentZKMetadata>
getNonConsumingSegmentsZKMetadataForRealtimeTable
List<SegmentZKMetadata> selectedSegmentZKMetadataList = new ArrayList<>();
for (SegmentZKMetadata segmentZKMetadata : segmentZKMetadataList) {
String segmentName = segmentZKMetadata.getSegmentName();
+ Map<String, String> instanceStateMap =
idealState.getInstanceStateMap(segmentName);
if (idealStateSegments.contains(segmentName)
&& segmentZKMetadata.getStatus().isCompleted() // skip consuming
segments
- &&
!idealState.getInstanceStateMap(segmentName).containsValue(SegmentStateModel.CONSUMING))
{
+ && (instanceStateMap == null ||
!instanceStateMap.containsValue(SegmentStateModel.CONSUMING))) {
Review Comment:
Treating a missing `instanceStateMap` as "non-consuming" changes the
method's safety behavior. The comment below says these segments should be
skipped so `RealtimeSegmentValidationManager` can repair the missing IdealState
update first; with `instanceStateMap == null || ...` we now schedule minion
work for exactly that broken-controller edge case.
--
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]