Skip to content

Commit

Permalink
add PR comment to VolumeRepair struct
Browse files Browse the repository at this point in the history
  • Loading branch information
jmpesp committed May 23, 2024
1 parent 47ad632 commit c6923ea
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nexus/db-model/src/volume_repair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
use crate::schema::volume_repair;
use uuid::Uuid;

/// When modifying a Volume by replacing its parts, Nexus should take care to
/// only replace one region or snapshot for a volume at a time. Technically, the
/// Upstairs can support two at a time, but codifying "only one at a time" is
/// safer, and does not allow the possiblity for a Nexus bug to replace all
/// three regions of a region set at a time (aka total data loss!). This "one at
/// a time" constraint is enforced by each repair also creating a VolumeRepair
/// record, a table for which there is a UNIQUE CONSTRAINT on the volume ID.
#[derive(Queryable, Insertable, Debug, Selectable, Clone)]
#[diesel(table_name = volume_repair)]
pub struct VolumeRepair {
Expand Down

0 comments on commit c6923ea

Please sign in to comment.