Consider encoding the version of message scheme in the preamble
- Dominant language
- C
- Stars
- 4.4k
- Forks
- 254
- PR merge metrics
- No merged PRs in 30d
Description
In [this commit](https://github.com/canonical/raft/pull/303/commits/007b8c124c34a022054ddd6f39797be31ee150d7) of https://github.com/canonical/raft/pull/303 we started using only the first 2 bytes to read the message type out of a 64-bit slot in the message preamble, instead of using the full 8 bytes of the slot.
That was done in preparation of using the rest of the slot to store additional information, such has a version for the scheme of a specific message type.
I think sufficient time has now passed that we could start actually encoding the schema version in that space, and be confident that the node on the other side will either read it (and take it into account when decoding), or ignore it and assume that the version is `0`.
Thoughts?
Contributor guide
Research direction
Start by reviewing commit 007b8c124c34a022054ddd6f39797be31ee150d7 from pull request 303 and trace how the message preamble's 64-bit slot is encoded and decoded. Determine the versioning scheme and compatibility behavior before changing it; done criteria are not specified in the issue, so the expected version semantics need clarification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- databases, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100