Skip to content

Commit

Permalink
turns out it's fine to not unlock deleted instances
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Jul 31, 2024
1 parent ce3c35d commit 591d51f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nexus/db-queries/src/db/datastore/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1128,9 +1128,7 @@ impl DataStore {
let UpdaterLock { updater_id, locked_gen } = *lock;

let result = diesel::update(dsl::instance)
// N.B. that we intentionally *don't* filter out instances that have
// been deleted. If the instance doesn't exist, whatever. It is, by
// definition, "unlocked"... :)
.filter(dsl::time_deleted.is_null())
.filter(dsl::id.eq(instance_id))
// Only unlock the instance if:
// - the provided updater ID matches that of the saga that has
Expand Down

0 comments on commit 591d51f

Please sign in to comment.