Stable marshaling of empty non-nil messages #59
Labels
No labels
P0
P1
P2
P3
good first issue
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#59
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?
Expected Behavior
Protobuf encodes nil message and empty message (all nested fields are zero values) differently.
Current Behavior
Stable marshaler ignores non-nil value of empty nested structure and removes it from wire. So this test below fails.
Possible Solution
Some nil checks via reflection instead of size checks helps to pass the test but it might be not quite good for performance. Example below fails in some tests but it works for this issue.
Context
It was found during update checks from frostfs-node v0.36.0 to v0.37.0. Stored bearer token now fail signature check because of different marshaling output of EACL Table with non-nil empty version field.
Broken in
59c8421597
(#49)fyrchik referenced this issue2023-11-21 12:27:31 +00:00