Use streams to marshal/unmarshal object's payload #849
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#849
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In scope of 1338 introduced new argument '--binary' which help us to serialize object structure.
But we need a way to avoid store whole payload in memory to use Marshal/Unmarhsal methods.
Solution
It is preferable to use streams of bytes.
Let's also think about being forwards and/or backwards compatible with the next API versions.
Related to https://github.com/nspcc-dev/neofs-node/issues/1932
Places, where we need to improve:
objToStore.SetPayload(payloadBuffer.Bytes())
commonCmd.ExitOnErr(cmd, "can't unmarshal object from given file: %w", objTemp.Unmarshal(buf))
acid-ant referenced this issue2023-12-07 06:48:36 +00:00
acid-ant referenced this issue2023-12-07 06:49:03 +00:00
TBH I would rather drop the whole binary feature, it seems unused and storing big objects as
--binary
actually creates new object, which couldn't be put without further processing (this was the whole motivation behind--binary
).How about storing set of objects - link, part1, part2...?