Files: wake the task manager when a deletion queues its undelete task #234

Merged
jcoffey-dev merged 1 commits from fix/file-deletes-wake-tasks into main 2026-10-29 16:34:19 +00:00
Owner

Deleting a file queues the task that archives it for undelete, but no file delete path woke the task manager, so the task waited for the manager's next periodic scan, up to five minutes. FileNode/set and FileNode/copy, and WebDAV DELETE, COPY and MOVE, now wake it after committing, as the calendar, contact and mail paths already do.

This was the system suite's stall: the system and jmap suites each waited out one of those five minutes on every run (the system suite's occasional LMTP timeout came right after it). With the change they take about 2.5 and 3 minutes instead of 7.5 and 8.

Test: a new webdav check (tests/src/webdav/file_tasks.rs) deletes files over WebDAV and JMAP and needs the task queue empty within 10 s. It fails on main; taking out the JMAP or MOVE part of the change alone fails its own step. Checked locally: fmt, fork checks, and the webdav, jmap and system suites pass.

Deleting a file queues the task that archives it for undelete, but no file delete path woke the task manager, so the task waited for the manager's next periodic scan, up to five minutes. FileNode/set and FileNode/copy, and WebDAV DELETE, COPY and MOVE, now wake it after committing, as the calendar, contact and mail paths already do. This was the system suite's stall: the system and jmap suites each waited out one of those five minutes on every run (the system suite's occasional LMTP timeout came right after it). With the change they take about 2.5 and 3 minutes instead of 7.5 and 8. Test: a new webdav check (tests/src/webdav/file_tasks.rs) deletes files over WebDAV and JMAP and needs the task queue empty within 10 s. It fails on main; taking out the JMAP or MOVE part of the change alone fails its own step. Checked locally: fmt, fork checks, and the webdav, jmap and system suites pass.
jcoffey-dev added 1 commit 2026-10-29 16:24:43 +00:00
Files: wake the task manager when a deletion queues its undelete task
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 9m6s
d5996f9209
Deleting a file queues the task that archives it for undelete. Files
aren't search-indexed, so the file paths had never queued a task before,
and none of them woke the task manager after writing it. The task waited
for the manager's next periodic look at the queue, up to five minutes,
unless other work happened to wake it first.

FileNode/set and FileNode/copy, and WebDAV DELETE, COPY and MOVE now wake
it after committing a deletion, as the calendar, contact and mail paths
already do. The system and jmap suites each sat out one of those waits
on every run, and the system suite's occasional LMTP timeout came right
after it: they now take about 2.5 and 3 minutes instead of 7.5 and 8.

Test: a new webdav check deletes files over WebDAV (DELETE, COPY and MOVE
over a file) and JMAP, and needs the queue empty within 10 s. On main the
WebDAV DELETE task was still queued after 10 s; taking out the JMAP or
MOVE change alone fails its own step; with the change all pass.
jcoffey-dev merged commit a45bb2feb5 into main 2026-10-29 16:34:19 +00:00
jcoffey-dev deleted branch fix/file-deletes-wake-tasks 2026-10-29 16:34:19 +00:00
Sign in to join this conversation.