Stable marshaling of empty non-nil messages #59
Labels
No Label
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 Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-api-go#59
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. 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