Skip to content

Stop the parent-then-child test writer by its own clock - #1778

Merged
thekevinscott merged 2 commits into
mainfrom
bot/1777-watch-limit-main-red-1118
Nov 20, 2026
Merged

thekevinscott merged 2 commits into
mainfrom
bot/1777-watch-limit-main-red-1118

Conversation

@thekevinbot

Copy link
Copy Markdown
Collaborator

Fixes #1777

queries_never_fail_while_a_writer_creates_parents_then_children stopped its writer only after its query loop ended. A query waits for a writer that creates folders faster than they are walked, which is the documented, accepted limit. Under a slow or contended runner, each after_walks round brought in more new folders than the last. The batch never ended, the writer never stopped, and the query failed when the inotify watch limit ran out. No watches leaked: the count stayed at or below the number of real directories.

The writer now stops by its own clock (3 s), the same pattern folder_created_while_running.rs already uses. The assertion is unchanged: every query must succeed. No product change.

Red: main's Rust CI run 44447544207, job 135303265793: 1 of 6 queries failed; first: inotify watch limit reached, binary finished in 101.35s.

Manual exercise: a local contended repro, with the test pinned to one core shared with 3 yes hogs. Before the change it hung past the timeout (round sizes 26 → 6836 events, growing about ×1.6 per round). After it, 3 runs passed in 4.52s, 4.66s and 4.71s.

E2E Verification

Test-only change under packages/rust/tests/, so no e2e suite is affected and no receipt is owed. Ran cargo test --test queries_apply_events locally (pass).

A query waits for a writer that creates folders faster than they are
walked, so a writer stopped only once the queries end could run until
the inotify watch limit.
@thekevinscott
thekevinscott merged commit db56421 into main Nov 20, 2026
87 checks passed
@thekevinscott
thekevinscott deleted the bot/1777-watch-limit-main-red-1118 branch November 20, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

queries_never_fail_while_a_writer_creates_parents_then_children fails on main: inotify watch limit reached

2 participants