Do not marshal the same object twice in PutSingle
#531
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#531
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?
It rubs me wrong way, when I see the same object being repeatedly marshaled just to be sent to different clients. It is the same. Consider
PutSingle
: we receive a message which contains perfectly valid object, we need to unmarshal it (for validation), but that's all: the same bytes should be both put in the local storage and sent to other clients.Another thing is payload: marshaled + unmarshaled form take twice as much space as just an object, because the payload is copied (needs verification).
I believe we can do better.
In this task:
Ideally we would like to have a single slice with the same lifetime as
PutSingle
RPC (currently its 3x overhead forREP 2
, even more for a simplePut
).We will decide what the next step is after research.
Related #463
Verification/signing is another thing that could benefit.
Memory allocations reduced by drop redundant
unmarshal
s