You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/07 13:59:08 UTC

[GitHub] [arrow] tustvold commented on pull request #9926: ARROW-12254: [Rust][DataFusion] Stop polling limit input once limit is reached

tustvold commented on pull request #9926:
URL: https://github.com/apache/arrow/pull/9926#issuecomment-814937778


   So I can understand from the code it polling the inner stream once before discarding the results of this and returning None, but at this point it should not be polled again. According to the [stream trait](https://docs.rs/futures/0.3.13/futures/stream/trait.Stream.html#panics)
   
   > Once a stream has finished (returned Ready(None) from poll_next), calling its poll_next method again may panic, block forever, or cause other kinds of problems; the Stream trait places no requirements on the effects of such a call. However, as the poll_next method is not marked unsafe, Rust's usual rules apply: calls must never cause undefined behavior (memory corruption, incorrect use of unsafe functions, or the like), regardless of the stream's state.
   >
   > If this is difficult to guard against then the fuse adapter can be used to ensure that poll_next always returns Ready(None) in subsequent calls.
   
   If this is occurring, there may be a more fundamental issue at play here that also needs fixing
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org