otterc commented on a change in pull request #33622: URL: https://github.com/apache/spark/pull/33622#discussion_r682988328
########## File path: common/network-common/src/main/java/org/apache/spark/network/server/OneForOneStreamManager.java ########## @@ -76,7 +76,10 @@ public OneForOneStreamManager() { @Override public ManagedBuffer getChunk(long streamId, int chunkIndex) { StreamState state = streams.get(streamId); - if (chunkIndex != state.curChunk) { + if (state == null) { + throw new IllegalStateException(String.format( + "Requested chunk has been removed for streamId %s", streamId)); Review comment: Nit: Can we say that `chunk not available since streamId %s is closed". This seems more accurate -- 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: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org