gortiz commented on code in PR #12351: URL: https://github.com/apache/pinot/pull/12351#discussion_r1475698239
########## 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: This is not an actual problem, but it is a bit confusing. `_recentlyOffloadedConsumingSegments` is only populated with realtime tables, why do we need to check `if (TableNameBuilder.isRealtimeTableResource(tableNameWithType))`? Is the reason to do not create the pair? -- 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