Skip to content

Commit

Permalink
Add TODO, re: concurrency safety
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Jul 1, 2024
1 parent 2c6eb01 commit e4123a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sled-agent/src/sled_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,17 @@ impl SledAgent {
config: OmicronPhysicalDisksConfig,
) -> Result<DisksManagementResult, Error> {
// First, tell the storage subsystem which disks should be managed.
//
// TODO: Do we want to prevent future calls to
// "omicron_physical_disks_ensure" until we finish flushing?
//
// Otherwise, we the following could occur:
//
// - Ensure Disks {A, B, C}
// - ... try to remove all non-conforming disks
// - Ensure Disks {A, B, C, D} concurrently
// - ... we remove an instance on disk "D" because the old flush is
// still happening?
let disk_result =
self.storage().omicron_physical_disks_ensure(config).await?;

Expand Down

0 comments on commit e4123a9

Please sign in to comment.