-
Notifications
You must be signed in to change notification settings - Fork 383
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
cleanup(storage): simplify ObjectReadStreambuf #6983
cleanup(storage): simplify ObjectReadStreambuf #6983
Conversation
Simplify the implementation of `storage::internal::ObjectReadStreambuf`. The class had two different paths to get more data from the underlying `internal::ObjectReadSource`, this change makes all reads through the `xsgetn()` function. In addition, the class was sloppy with the hash validator, potentially using it after it was moved-from, luckily this was harmless, but no reason to keep doing so. I added some integration tests to cover corner cases that were only detected by accident in other tests.
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Codecov Report
@@ Coverage Diff @@
## main #6983 +/- ##
=======================================
Coverage 94.56% 94.57%
=======================================
Files 1298 1298
Lines 114599 114608 +9
=======================================
+ Hits 108371 108385 +14
+ Misses 6228 6223 -5
Continue to review full report at Codecov.
|
Google Cloud Build Logs
ℹ️ NOTE: Kokoro logs are linked from "Details" below. |
Simplify the implementation of
storage::internal::ObjectReadStreambuf
.The class had two different paths to get more data from the underlying
internal::ObjectReadSource
, this change makes all reads through thexsgetn()
function.In addition, the class was sloppy with the hash validator, potentially
using it after it was moved-from, luckily this was harmless, but no
reason to keep doing so.
I added some integration tests to cover corner cases that were only
detected by accident in other tests.
Part of the work for #4156 and #4157
This change is