Jackie-Jiang commented on code in PR #12351: URL: https://github.com/apache/pinot/pull/12351#discussion_r1520636758
########## pinot-server/src/main/java/org/apache/pinot/server/starter/helix/SegmentOnlineOfflineStateModelFactory.java: ########## @@ -215,6 +240,15 @@ public void onBecomeDroppedFromOffline(Message message, NotificationContext cont String segmentName = message.getPartitionName(); try { _instanceDataManager.deleteSegment(tableNameWithType, segmentName); + + // Check if the segment is recently offloaded from CONSUMING to OFFLINE + if (TableNameBuilder.isRealtimeTableResource(tableNameWithType)) { + Pair<String, String> tableSegmentPair = Pair.of(tableNameWithType, segmentName); + if (_recentlyOffloadedConsumingSegments.getIfPresent(tableSegmentPair) != null) { + _recentlyOffloadedConsumingSegments.invalidate(tableSegmentPair); + onConsumingToDropped(tableNameWithType, segmentName); + } Review Comment: Yes, and to reduce a cache lookup. OFFLINE table doesn't really have CONSUMING state -- 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