also assert still ongoing

This commit is contained in:
Joonas Koivunen
2024-07-25 09:23:41 +00:00
parent dcff25c293
commit 14a0517c7f

View File

@@ -1132,6 +1132,10 @@ pub(super) async fn detach_and_reparent(
if let Some(ancestor) = existing {
Ancestor::Detached(ancestor, ancestor_lsn)
} else {
assert!(
still_ongoing,
"cannot complete if the operation is not still ongoing"
);
let direct_children =
reparented_direct_children(detached, tenant).map_err(Error::from)?;
return Ok(DetachingAndReparenting::AlreadyDone(direct_children));