-
Notifications
You must be signed in to change notification settings - Fork 50
storage: Support RANGE streaming and use it in Object service #3776
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
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3776 +/- ##
==========================================
+ Coverage 25.60% 25.65% +0.04%
==========================================
Files 657 657
Lines 42097 42117 +20
==========================================
+ Hits 10780 10805 +25
+ Misses 30338 30335 -3
+ Partials 979 977 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a612124 to
6135140
Compare
f662d03 to
893af9a
Compare
893af9a to
1f281f3
Compare
Previously, buffer to copy local part into could theoretically be unallocated, leaving the part after `copy()` uninitialized. This could lead to a false-negative recovery when exactly one part was missing. Refs #3554. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Previous GetRange() implementation opened stream and read data into buffer allocated in place. Stream opening may now be done via GetRangeStream(). GetRange() of lower components (Shard, FSTree) are dropped as no longer used. Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
1f281f3 to
b17a546
Compare
|
|
||
| if off > math.MaxInt64 || ln > math.MaxInt64 { // 8 exabytes, amply | ||
| stream.Close() | ||
| return nil, fmt.Errorf("range overflowing int64 is not supported by this server: off=%d,len=%d", off, ln) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is not func's arg then?
|
|
||
| if e.blockErr != nil { | ||
| return nil, e.blockErr | ||
| stream, err := e.getRangeStream(addr, offset, length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ok that all the code below can be executed, despite any changes to e.blockMtx now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't be a problem to me, it doesn't depend on engine state.
Closes #3593. Refs #3439.