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 2022/05/30 11:46:11 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #13250: ARROW-16675: [C++] Wrong Tell() result from BufferedOutputStream in an edge case

pitrou commented on code in PR #13250:
URL: https://github.com/apache/arrow/pull/13250#discussion_r884741256


##########
cpp/src/arrow/io/buffered.cc:
##########
@@ -144,6 +144,8 @@ class BufferedOutputStream::Impl : public BufferedBase {
       RETURN_NOT_OK(FlushUnlocked());
       DCHECK_EQ(buffer_pos_, 0);
       if (nbytes >= buffer_size_) {
+        // Invalidate cached raw pos
+        raw_pos_ = -1;

Review Comment:
   Could this instead be `raw_pos_ += nbytes`?



-- 
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: github-unsubscribe@arrow.apache.org

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