oxidecomputer / oxidecomputer/omicron
consider re-writing ledgers on sled-agent startup if serialization has changed
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
(discussed on 2025-09-23 update call)
There are cases like this one where we've used serde(default) to fill in default values of structures read from disk:
https://github.com/oxidecomputer/omicron/pull/8983#discussion_r2364661560
That's been used when we want to add new values and can provide a suitable default.
There have been other cases where we proactively added code to migrate from one on-disk format to another, as in #4466.
We discussed an idea where on startup, after reading its ledgers, sled-agent would serialize them again, and if the serialized form differs from the bytes on disk, then it would write the new form to disk. The goal is to know when it's safe to remove support for older formats (namely, once we know all systems will have run the release that re-wrote the old format into the new one).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing sled-agent startup after its ledgers are read, then review the serialization examples in PR #8983 and migration precedent in issue #4466. Determine how serialized bytes would be compared with the on-disk form and what conditions define a safe rewrite; done means the approach and its compatibility boundaries are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100