Use new protobuf marshaler #1322
No reviewers
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 milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1322
Loading…
Reference in a new issue
No description provided.
Delete branch "fyrchik/frostfs-node:update-marshaling"
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?
@TrueCloudLab/storage-core-committers @TrueCloudLab/storage-core-developers
I am concerned about the necessity to copy the slice before the unmarshaling.
This is because bbolt
Bucket.Get()
return value lifetime is equal to that of a transaction.I may have forgotten some of the places, please recheck if possible.
9894847659
to1368911f67
@ -63,3 +61,1 @@
if !sig.Verify(body.StableMarshal(nil)) {
commonCmd.ExitOnErr(cmd, "", errors.New("invalid response signature"))
}
// if !sig.Verify(body.StableMarshal(nil)) {
Disabled for debug?
oops, yes
moved to WIP, will revisit everything
Fixed, retested on dev-env
Use new protobuf marshalerto WIP: Use new protobuf marshaler1368911f67
to19baa40a77
19baa40a77
toc524cb145d
c524cb145d
to6e1b74c58e
WIP: Use new protobuf marshalerto Use new protobuf marshaler6e1b74c58e
to203ddb1800
Awesome
@ -114,10 +114,8 @@ protoc:
echo "⇒ Processing $$f "; \
$(PROTOC_DIR)/bin/protoc \
--proto_path=.:$(PROTOC_DIR)/include:/usr/local/include \
--plugin=protoc-gen-go=$(PROTOC_GEN_GO_DIR)/protoc-gen-go \
If it not required, then need to drop this variable.
fixed
@ -125,3 +126,3 @@
data = getFromBucket(tx, bucketNameLockers(cnr, bucketName), key)
if len(data) != 0 {
return obj, obj.Unmarshal(data)
return obj, obj.Unmarshal(bytes.Clone(data))
What is the benefit of using a new marshalled in the end?
[]Attribute
fields, that will allow us to gradually remove layers inToGRPCMessage()
conversion functions from the api-go.203ddb1800
to80bd32e866
Technically it looks ok, but I would add performance tests.
@dstepanov-yadro good idea!
Here are the results for
BenchmarkSubstorageReadPerf
from theblobstor/perf_test.go
.I have intentionally stripped some of the benchmarks because they are too slow.
old
is master,new
is this PR.The improvements are there both in terms of allocations and speed. I expect gains to be even bigger for big objects.
The diff I have applied.