nspcc-dev / neofs-sdk-go

Go implementation of NeoFS SDK
Apache License 2.0
6 stars 14 forks source link

slicer: Do not put link objects that will be rejected #566

Closed carpawell closed 8 months ago

carpawell commented 8 months ago

Since link objects have payload now, they may overflow max regular object size. Client-size error is better that server-side overflow message. Not expected in practice but may be observed when running some extreme local installations for tests (e.g., 1K limit and 100K object).

carpawell commented 8 months ago

However, we also may allow LINK objects to be bigger than regular object size limit.

Also, that is not really helpful if the whole object is PUT already and only the last iteration has failed. A user cannot even know any ID.

cthulhu-rider commented 8 months ago

@carpawell tests with small limit broke, should be fixed. For example, we can predict whether links will fit into the object, and if not, expect an introduced error. Tested limits' increase could also be needed

carpawell commented 8 months ago

tests with small limit broke, should be fixed

Just increased the limits, if you don't mind. There is not much we can do here.

For example, we can predict whether links will fit into the object

Only if we know the exact object size. That is not granted. And i think in practice a known object size is not the case where it cannot fit a link. Not sure what can store 95TB, know its size and stream it to the NeoFS.

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

:exclamation: No coverage uploaded for pull request base (master@0c41af6). Click here to learn what that means.

Files Patch % Lines
object/slicer/slicer.go 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #566 +/- ## ========================================= Coverage ? 68.15% ========================================= Files ? 122 Lines ? 9964 Branches ? 0 ========================================= Hits ? 6791 Misses ? 2799 Partials ? 374 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.