Correct the stop timeout comments on the archive writers
check / check (push) Successful in 4m28s

The comments on the engine's stop and on the timeout test gave false
reasons for leaving archive writers open when the stop budget runs
out. Closing them would wait for any write in progress, and a worker
still running would then open new writers that nothing closes, so
closing gains nothing over a kill.

Model: opus-5-5
This commit is contained in:
2026-09-29 05:48:54 +00:00
parent 4452ef71fb
commit d03bb0ed08
2 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -368,9 +368,9 @@ func (e *Engine) start() {
// writer for long by then: the archive sweeper stops before the
// engine, and deleting a webhook only closes one. If the pool did
// not drain in time, the writers are left open, as a kill would
// leave them: a worker still running may be mid-write, and
// closing its writer would wait on that write and then fail the
// next delivery the worker archives.
// leave them. Closing them would wait for any write in progress,
// and a worker still running would then open new writers that
// nothing closes, so it gains nothing over a kill.
func (e *Engine) stop(ctx context.Context) error {
e.log.Info("delivery engine stopping")