Skip to content

Commit

Permalink
node/range: Do not set zero range length for child objects always
Browse files Browse the repository at this point in the history
If it is a non-last child to range, its length should be set and cover the whole
child object, not be a zero.

Signed-off-by: Pavel Karpy <[email protected]>
  • Loading branch information
carpawell committed Mar 26, 2024
1 parent 109a12c commit 9546f43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/services/object/get/assembly_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (exec *execCtx) rangeFromLink(link objectSDK.Link) bool {

if i == first {
rngPerChild.SetOffset(uint64(firstOffset))
rngPerChild.SetLength(uint64(child.ObjectSize()) - uint64(firstOffset))

Check warning on line 117 in pkg/services/object/get/assembly_v2.go

View check run for this annotation

Codecov / codecov/patch

pkg/services/object/get/assembly_v2.go#L117

Added line #L117 was not covered by tests
}
if i == last {
rngPerChild.SetLength(uint64(lastBound) - rngPerChild.GetOffset())
Expand Down

0 comments on commit 9546f43

Please sign in to comment.