From 8daa1b6dddd6bb18db89361a59b39aa1057cde1d Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 28 Oct 2026 09:22:22 -0700 Subject: [PATCH] vector: Lease::forget hands the tag name off without releasing (#12174) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- seaweed-vector/crates/core/src/maintenance.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/seaweed-vector/crates/core/src/maintenance.rs b/seaweed-vector/crates/core/src/maintenance.rs index 0391fd3fc5..4eee54e03e 100644 --- a/seaweed-vector/crates/core/src/maintenance.rs +++ b/seaweed-vector/crates/core/src/maintenance.rs @@ -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 {