Repository navigation
test(fsevents): record the final batch before stopping - #280
Closed
anmonteiro wants to merge 1 commit into
Closed
anmonteiro wants to merge 1 commit into
anmonteiro wants to merge 1 commit into
Conversation
Signed-off-by: Antonio Nuno Monteiro <[email protected]>
This was referenced Nov 28, 2026
anmonteiro
added a commit
to ocaml/dune
that referenced
this pull request
Nov 29, 2026
Record the final FSEvents callback batch before stopping the stream wakes the waiter, preventing the log from being flushed before those events are recorded. Standalone extraction from #17301 and anmonteiro#280; complements the cleanup-ordering fix in #17310. The timing reproduction and local-check limitations are documented in anmonteiro#280. 01a20619-183b-76f3-b8a7-18c1b28eb1c0 Signed-off-by: Antonio Nuno Monteiro <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When an end marker shares a callback batch with real events,
sync#stopwakes the waiting thread before the callback has recorded those events. The waiter can flush an incomplete log and produce an empty or partial expectation. Record the batch before stopping.This fits the earlier per-stream synchronization and logger isolation work: the remaining gap is between callback logging and completion. It is separate from the production dispatch-queue fixes in ocaml#14730. The 2022 CI-disable commits do not establish that this race caused those historical failures.
A temporary experiment in the combined branch used 0.2s stream latency, removed the post-operation flush, and paused 0.2s after stopping. Before the fix, snapshots lost events; with logging before stopping, the same experiment passed. The perturbations are not committed here.
Independent extraction from ocaml#17301, merged upstream as ocaml#17313. It changes neither accepted events nor timeouts and can be reviewed before the CI gate is removed in #289.
@check @fmtpass. TheCI=truefull check still skips the raw suite on this draft and has the baseline failures recorded in ocaml#17301.01a20619-183b-76f3-b8a7-18c1b28eb1c0