Skip to content

Commit

Permalink
review nits
Browse files Browse the repository at this point in the history
  • Loading branch information
iliana committed Aug 22, 2024
1 parent e7e8202 commit 9f09cb8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions nexus/db-queries/src/db/datastore/cockroachdb_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ mod test {
assert_eq!(version, CockroachDbClusterVersion::POLICY);
} else {
panic!(
"`cluster.preserve_downgrade_option` should not be {:?}",
settings.preserve_downgrade
"`cluster.preserve_downgrade_option` is {:?},
but it should be empty or \"{}\"",
settings.preserve_downgrade, version
);
}

Expand Down
7 changes: 5 additions & 2 deletions nexus/src/app/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,11 @@ impl super::Nexus {
)?;
CockroachDbClusterVersion::NEWLY_INITIALIZED
} else {
// Fill in the blueprint with the current value of the option in
// the database.
// `cluster.preserve_downgrade_option` is set, so fill in the
// blueprint with the current value. This branch should never
// be hit during normal rack initialization; it's here for
// eventual test cases where `cluster.preserve_downgrade_option`
// is set by a test harness prior to rack initialization.
CockroachDbClusterVersion::from_str(
&cockroachdb_settings.preserve_downgrade,
)
Expand Down

0 comments on commit 9f09cb8

Please sign in to comment.