vector: Lease::forget hands the tag name off without releasing (#12174)

* vector: Lease::forget hands the tag name off without releasing

A distributed planner pins the planned version and forwards the tag
name to the executor — the guard must not release on drop.

* vector: forget untracks the lease so an abandoned handoff expires

The tag left LIVE_TAGS but the drop-time release was disabled — an
abandoned handoff survived forever locally. Untrack it so the lease
TTL still reaps it.
This commit is contained in:
Chris Lu authored and GitHub committed 2026-10-28 09:22:22 -07:00
1 parent 511727cf3a
commit 8daa1b6ddd
1 file changed
+10
@@ -45,6 +45,16 @@ impl Lease {
untrack(&tag);
release(&self.dataset, &tag).await
}
/// Hand the tag name off and skip the drop-time release — a distributed
/// planner keeps the version pinned until an executor takes over. The
/// tag leaves LIVE_TAGS so an abandoned handoff still expires at the
/// lease TTL instead of surviving forever locally.
pub fn forget(mut self) -> String {
let tag = std::mem::take(&mut self.tag);
untrack(&tag);
tag
}
}
impl Drop for Lease {