noob-se7en commented on code in PR #15419: URL: https://github.com/apache/pinot/pull/15419#discussion_r2038126868
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java: ########## @@ -518,15 +518,13 @@ public void addConsumingSegment(String segmentName) private void doAddConsumingSegment(String segmentName) throws AttemptsExceededException, RetriableOperationException { - SegmentZKMetadata zkMetadata = fetchZKMetadata(segmentName); - if (!_enforceConsumptionInOrder && zkMetadata.getStatus().isCompleted()) { + SegmentZKMetadata zkMetadata = fetchZKMetadataNullable(segmentName); Review Comment: > We do want it to throw exception when ZK metadata is removed. That will put segment in error state. > This is an unexpected scenario Why? Like this is valid scenario: 1. offline -> consuming 2. consuming -> dropped ########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeTableDataManager.java: ########## @@ -518,15 +518,13 @@ public void addConsumingSegment(String segmentName) private void doAddConsumingSegment(String segmentName) throws AttemptsExceededException, RetriableOperationException { - SegmentZKMetadata zkMetadata = fetchZKMetadata(segmentName); - if (!_enforceConsumptionInOrder && zkMetadata.getStatus().isCompleted()) { + SegmentZKMetadata zkMetadata = fetchZKMetadataNullable(segmentName); Review Comment: > We do want it to throw exception when ZK metadata is removed. That will put segment in error state. > This is an unexpected scenario Why? Like this is valid scenario: 1. offline -> consuming 2. consuming -> dropped -- 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