Remove idle upstream host semaphores and delete a variant's .meta file with it (closes #87) #171

Merged
clawbot merged 3 commits from issue-87-hostsems-meta into next 2026-10-04 07:11:32 +02:00
3 Commits
Author SHA1 Message Date
clawbot 4d30d17e44 Test a fetch whose context ends waiting for a shared connection
check / check (push) Waiting to run
A fetch from a host with nothing open waits for the connection shared by
all hosts, and its context ends long before the wait timeout; once every
response is closed, no semaphore may be left in hostSems.

Model: opus-5-5
2026-10-04 04:58:41 +00:00
clawbot ec97fdf91e Remove idle host semaphores and delete .meta with its variant (closes #87)
Each upstream host's semaphore now counts the fetches holding or waiting
for one of its slots, and is removed from hostSems when the last of them
gives its slot back or stops waiting, so a long-running pixad no longer
keeps one semaphore per host it ever fetched from. The semLen test helper
reads hostSems directly, as getHostSemaphore now counts its caller.

VariantStorage.Delete removes the variant's .meta file too, a missing one
not being an error; DeleteWithMeta, which eviction called for that, is
gone.

Model: opus-5-5
2026-10-04 04:58:41 +00:00
clawbot f2384bc849 Test that idle host semaphores and .meta files are removed
New tests, failing before the fix: fetches from many hosts, and fetches
that end without a connection, must leave no semaphore in hostSems once
they finish; VariantStorage.Delete must remove the variant's .meta file,
and must succeed when that file is already missing.

Model: opus-5-5
2026-10-04 04:58:26 +00:00