Skip to content

Emit the expected operating saga id when a failure to update the operating saga id occurs #8335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions nexus/db-queries/src/db/datastore/region_replacement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,11 @@ impl DataStore {
Ok(())
} else {
Err(Error::conflict(format!(
"region replacement {} set to {:?} (operating saga id {:?})",
"region replacement {} set to {:?} (operating saga id {:?}) (expected operating saga id {:?})",
region_replacement_id,
record.replacement_state,
record.operating_saga_id,
operating_saga_id,
)))
}
}
Expand Down Expand Up @@ -415,10 +416,11 @@ impl DataStore {
Ok(())
} else {
Err(Error::conflict(format!(
"region replacement {} set to {:?} (operating saga id {:?})",
"region replacement {} set to {:?} (operating saga id {:?}) (expected operating saga id {:?})",
region_replacement_id,
record.replacement_state,
record.operating_saga_id,
operating_saga_id,
)))
}
}
Expand Down Expand Up @@ -618,10 +620,11 @@ impl DataStore {
Ok(())
} else {
Err(Error::conflict(format!(
"region replacement {} set to {:?} (operating saga id {:?})",
"region replacement {} set to {:?} (operating saga id {:?}) (expected operating saga id {:?})",
region_replacement_id,
record.replacement_state,
record.operating_saga_id,
operating_saga_id,
)))
}
}
Expand Down
Loading