Skip to content

Commit f73ab8e

Browse files
authored
Add a clarifying comment about deleted volumes (#8328)
During debugging, we saw a region snapshot replacement that was operating on a deleted snapshot. The fact that this was ok was not clear, so this commit adds a comment explaining why operating on a snapshot with a hard-deleted volume is ok, and in fact required.
1 parent 04f6974 commit f73ab8e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nexus/src/app/background/tasks/region_snapshot_replacement_start.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,13 @@ impl RegionSnapshotReplacementDetector {
246246
continue;
247247
}
248248

249+
// Do not check if the volume is deleted here: if the read-only
250+
// target is _not_ deleted (checked above), then even if the
251+
// snapshot volume is hard deleted there are still other references
252+
// in other volumes to those read-only targets that need replacing.
253+
// The start saga can handle if the snapshot volume is hard deleted,
254+
// so proceed with invoking it here.
255+
249256
let result = self
250257
.send_start_request(
251258
authn::saga::Serialized::for_opctx(opctx),

0 commit comments

Comments
 (0)