mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-29 16:30:44 +01:00
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:
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 {
|
||||
|
||||
Reference in new issue
Block a user