Fix #154: cancellable notify tasks #160
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!160
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-154"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task goroutines ignore ctx cancel: StartWebhooks used WithoutCancel, drainFanout used Background(), neither tracked in a WaitGroup — a wedged store call hung them forever, immune to drain/shutdown.
Same shape as the #74 import fix: the notify Service owns a drainCtx (cancelled by new Service.Drain, wired into serve.go phase 1 beside importSvc.Drain); both leaders derive store/network work from it and are tracked in Service.wg; new tasks refuse fast once draining (sweep-durable seqs re-drive via redrain). Leader on dead drainCtx force-ends via tasks.end (documented exception to #72 rule).
Tests: TestDrainInterruptsWedgedWebhooks + TestDrainInterruptsWedgedFanout (verified HANGING pre-fix, task stuck running) + TestDrainRefusesNewTasks. Full package suite green under -race; coverage 96.1% (>=95%); gofmt/vet clean. Doc Decisions entry appended (law 12).