mirror of
https://github.com/nspcc-dev/neofs-api.git
synced 2026-03-01 04:28:54 +00:00
Put object version field in the begining of the object message #18
Labels
No labels
I0
I1
I2
I3
I4
S0
S1
S2
S3
S3
S4
U2
U3
U4
bug
discussion
discussion
documentation
enhancement
enhancement
enhancement
feature
good first issue
question
task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
nspcc-dev/neofs-api#18
Loading…
Add table
Add a link
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?
Originally created by @alexvanin on GitHub (Aug 26, 2020).
Originally assigned to: @realloc, @alexvanin, @cthulhu-rider, @anatoly-bogatyrev on GitHub.
Object version can be used in low-level processing when storage works with stream of raw bytes, e.g. object storage takes slice of bytes, cuts version field with some offset and then chooses appropriate unmarshaler function. To do so we should have object version field in the beginning of byte stream.
Right now object version stored in the beginning of
Headermessage. With incompatible protocol changes, header message may be moved insideObjectmessage, so version offset may change between different protocol implementation.To avoid this,
Objectmessage can store version as a first field. But we should store version inHeadermessage anyway, so it may be confusing.Other solution -- to have an agreement to never change fields before
HeaderinObjectmessage.@realloc commented on GitHub (Aug 31, 2020):
We already had in mind that
Objectstructure will be extended by adding more headers and should not have incompatible changes. It's not likely forObjectto get incompatible changes breakingHeader.Versionfield extraction.Let's agree to never change fields before
HeaderinObjectmessage and keepVersionfield first in theHeader.