Skip to content

Conversation

@cthulhu-rider
Copy link
Contributor

Closes #3593. Refs #3439.

@codecov
Copy link

codecov bot commented Jan 14, 2026

Codecov Report

❌ Patch coverage is 64.22018% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 25.65%. Comparing base (8677303) to head (b17a546).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
...storage/blobstor/internal/storagetest/get_range.go 0.00% 14 Missing ⚠️
pkg/local_object_storage/blobstor/fstree/fstree.go 75.00% 4 Missing and 2 partials ⚠️
pkg/local_object_storage/engine/get.go 62.50% 5 Missing and 1 partial ⚠️
pkg/local_object_storage/engine/range.go 66.66% 3 Missing and 1 partial ⚠️
...ct_storage/blobstor/internal/storagetest/common.go 0.00% 2 Missing ⚠️
pkg/metrics/engine.go 80.00% 2 Missing ⚠️
pkg/services/object/get/util.go 0.00% 2 Missing ⚠️
pkg/services/policer/ec.go 0.00% 2 Missing ⚠️
...ct_storage/blobstor/internal/storagetest/delete.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cthulhu-rider cthulhu-rider force-pushed the storage-range-stream branch 4 times, most recently from a612124 to 6135140 Compare January 15, 2026 15:34
@cthulhu-rider cthulhu-rider marked this pull request as ready for review January 16, 2026 07:50
@cthulhu-rider cthulhu-rider force-pushed the storage-range-stream branch 2 times, most recently from f662d03 to 893af9a Compare January 16, 2026 14:03
@cthulhu-rider cthulhu-rider marked this pull request as draft January 16, 2026 14:12
Closes #3593. Refs #3439.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
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>
@cthulhu-rider cthulhu-rider marked this pull request as ready for review January 16, 2026 16:39

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)
Copy link
Member

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)
Copy link
Member

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?

Copy link
Member

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.

@roman-khimov roman-khimov merged commit 6285ebd into master Jan 16, 2026
21 of 22 checks passed
@roman-khimov roman-khimov deleted the storage-range-stream branch January 16, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream RANGE replies

4 participants