noob-se7en commented on code in PR #15903: URL: https://github.com/apache/pinot/pull/15903#discussion_r2135819344
########## pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java: ########## @@ -2958,15 +2958,31 @@ public void resetSegment(String tableNameWithType, String segmentName, @Nullable Set<String> instanceSet = parseInstanceSet(idealState, segmentName, targetInstance); Map<String, String> externalViewStateMap = externalView.getStateMap(segmentName); + List<String> instanceFailedList = null; for (String instance : instanceSet) { if (externalViewStateMap == null || SegmentStateModel.OFFLINE.equals(externalViewStateMap.get(instance))) { LOGGER.info("Skipping resetting for segment: {} of table: {} on instance: {}", segmentName, tableNameWithType, instance); } else { LOGGER.info("Resetting segment: {} of table: {} on instance: {}", segmentName, tableNameWithType, instance); - resetPartitionAllState(instance, tableNameWithType, Collections.singleton(segmentName)); + try { + resetPartitionAllState(instance, tableNameWithType, Collections.singleton(segmentName)); + } catch (Exception e) { + if (instanceFailedList == null) { + instanceFailedList = new ArrayList<>(); + } + instanceFailedList.add(instance); + LOGGER.error("Failed to reset segment: {} of table: {} on instance: {}", segmentName, tableNameWithType, + instance, e); + } Review Comment: Done. Although I tried to unify both resetSegment and resetSegments method but it will require some extra overhead. Let me know if still require to make change here. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org