Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARROW-15115: [C++] GcsFileSystem return errors if using closed streams #11976

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Dec 16, 2021

No description provided.

@github-actions
Copy link

@coryan coryan marked this pull request as ready for review December 16, 2021 16:41
return stream_.tellg() + offset_;
}

bool closed() const override { return !stream_.IsOpen(); }
bool closed() const override { return closed_ && !stream_.IsOpen(); }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason this is && rather than ||?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. zero-length objects are "born closed" in google-cloud-cpp. Probably a bug (or at least a very poorly thought API), but you can read() from them, while they return IsOpen() == false.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, can you add a comment about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. That got me thinking about the similar expression for output streams, and you were right in that case. Fixed that too.

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thank you @coryan

@pitrou pitrou closed this in 04641a3 Dec 20, 2021
@ursabot
Copy link

ursabot commented Dec 20, 2021

Benchmark runs are scheduled for baseline = 61745be and contender = 04641a3. 04641a3 is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed ⬇️1.35% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.18% ⬆️0.0%] ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python. Runs only benchmarks with cloud = True
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@coryan coryan deleted the ARROW-15115-gcsfs-report-more-read-write-errors branch December 20, 2021 14:31
rafael-telles pushed a commit to rafael-telles/arrow that referenced this pull request Dec 20, 2021
Closes apache#11976 from coryan/ARROW-15115-gcsfs-report-more-read-write-errors

Authored-by: Carlos O'Ryan <coryan@google.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants