Want consistent strategy for runtime/persistent config changes

Open
#883 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust

Research direction

Start by auditing the handlers that update runtime state and sled::Db, comparing whether each performs the database transaction or runtime update first. Map the concurrency gaps described in the issue and define a consistent strategy that preserves runtime and persistent-state consistency across interleaved requests and daemon restarts.

Written by the indexing model from the issue text.

Description

bfd bgp Bug important non-blocker rust want

When it comes to storing persistent state (for recovering from daemon restarts/crashes, currently implemented using sled::Db) and updating runtime state, there are a lot of inconsistencies in the way it's being applied.

Some handlers do the DB transaction first, others do runtime first. Many have concurrency gaps (e.g. interleaving add/del requests can result in inconsistencies between runtime and persistent state).

This is something we should really consider revamping so we can avoid having weird correctness bugs crop up in live deployments.

Dominant language
Rust
Stars
94
Forks
6
Avg merge
1d 8h
Merged PRs (30d)
12

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxidecomputer/maghemite

All issues in oxidecomputer/maghemite

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.