Skip to content

Commit f3f8ff9

Browse files
committed
fix some related incorrect comments while we're here
1 parent 07b3010 commit f3f8ff9

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

nexus/db-queries/src/db/datastore/instance.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,8 +1756,8 @@ impl DataStore {
17561756

17571757
match result {
17581758
// If we updated the record, the lock has been successfully
1759-
// inherited! Return `Ok(true)` to indicate that we have acquired
1760-
// the lock successfully.
1759+
// inherited! Return the new lock to indicate that we have acquired
1760+
// it successfully.
17611761
UpdateAndQueryResult { status: UpdateStatus::Updated, .. } => {
17621762
slog::debug!(
17631763
&opctx.log,
@@ -1775,7 +1775,7 @@ impl DataStore {
17751775
}
17761776
// The generation has advanced past the generation at which the
17771777
// lock was held. This means that we have already inherited the
1778-
// lock. Return `Ok(false)` here for idempotency.
1778+
// lock. Return `Ok` here for idempotency.
17791779
UpdateAndQueryResult {
17801780
status: UpdateStatus::NotUpdatedButExists,
17811781
ref found,

nexus/src/app/sagas/instance_update/start.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async fn siu_lock_instance(
125125
// This is necessary in order to satisfy the distributed saga requirement
126126
// that executing an action must be idempotent. Retrying transient database
127127
// errors indefinitely is necessary to ensure idempotency because it is
128-
// possible that a previous execution of this action *did* succesfully
128+
// possible that a previous execution of this action *did* successfully
129129
// acquire the lock but crashed before it completed.
130130
//
131131
// As an example of why this is important, consider a particularly

0 commit comments

Comments
 (0)