Skip to content

Commit

Permalink
fix backwards field ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jun 17, 2024
1 parent 8b500eb commit d56b148
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions nexus/db-model/src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ pub struct Instance {
#[diesel(embed)]
pub runtime_state: InstanceRuntimeState,

/// The generation number for the updater lock. This is updated whenever the
/// lock is acquired or released, and is used in attempts to set the
/// `updater_id` field to ensure that the snapshot which indicated that the
/// lock was not held is still valid when setting the lock ID.
#[diesel(column_name = updater_gen)]
pub updater_gen: Generation,

/// A UUID identifying the saga currently holding the update lock on this
/// instance. If this is [`None`] the instance is not locked. Otherwise, if
/// this is [`Some`], the instance is locked by the saga owning this UUID.
Expand All @@ -76,6 +69,13 @@ pub struct Instance {
/// This field is guarded by the instance's `updater_gen`
#[diesel(column_name = updater_id)]
pub updater_id: Option<Uuid>,

/// The generation number for the updater lock. This is updated whenever the
/// lock is acquired or released, and is used in attempts to set the
/// `updater_id` field to ensure that the snapshot which indicated that the
/// lock was not held is still valid when setting the lock ID.
#[diesel(column_name = updater_gen)]
pub updater_gen: Generation,
}

impl Instance {
Expand Down

0 comments on commit d56b148

Please sign in to comment.