You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'd like to work on this, if nobody else has picked it up.
From the CI log, this looks like a timing flake in the test, not a DataSaver bug:
The failing example was breakpoint=1, write_period=0.1, and it passed on replay (Hypothesis reported Flaky).
In the failing runs the only flush is the one from __exit__, so add_result never saw write_period as elapsed after sleep(write_period * 1.1). Both points were still written on exit.
My guess: the 10 ms margin is below the Windows timer tick (~15.6 ms), so the sleep came up slightly short. I have not reproduced this.
Also, the retry loop from #5583 only sleeps. Since a flush is only triggered from add_result, I don't think it can change points_written.
Proposed fix, either:
Wait until perf_counter() - datasaver._last_save_time > write_period holds before the final add_result, or
Monkeypatch perf_counter so the test controls the clock (no real sleeping).
Which do you prefer, and is this still seen in CI on current Python versions?
You are welcome to work on this but please check that the issue still exists. Please note that #8758 fixes similar issues and perhaps this one. The preference is likely option 2 to avoid any flakiness.
Hi Jens Hedegaard Nielsen (@jenshnielsen) , I tried to reproduce this on current main (Windows, Python 3.13.14). The test passed 30/30 runs, and replaying the failing case from the original log (breakpoint=1, write_period=0.1) directly 200 times gave 0 failures. The original report was on Python 3.10, so I think the more precise sleep on Windows in newer Pythons may have fixed it.
Activity
Sushant0X0 commentedon Nov 14, 2026
Hi! I'd like to work on this, if nobody else has picked it up.
From the CI log, this looks like a timing flake in the test, not a
DataSaverbug:breakpoint=1, write_period=0.1, and it passed on replay (Hypothesis reportedFlaky).__exit__, soadd_resultnever sawwrite_periodas elapsed aftersleep(write_period * 1.1). Both points were still written on exit.Also, the retry loop from #5583 only sleeps. Since a flush is only triggered from
add_result, I don't think it can changepoints_written.Proposed fix, either:
perf_counter() - datasaver._last_save_time > write_periodholds before the finaladd_result, orperf_counterso the test controls the clock (no real sleeping).Which do you prefer, and is this still seen in CI on current Python versions?
jenshnielsen commentedon Nov 18, 2026
You are welcome to work on this but please check that the issue still exists. Please note that #8758 fixes similar issues and perhaps this one. The preference is likely option 2 to avoid any flakiness.
Sushant0X0 commentedon Nov 18, 2026
Hi Jens Hedegaard Nielsen (@jenshnielsen) , I tried to reproduce this on current main (Windows, Python 3.13.14). The test passed 30/30 runs, and replaying the failing case from the original log (
breakpoint=1, write_period=0.1) directly 200 times gave 0 failures. The original report was on Python 3.10, so I think the more precisesleepon Windows in newer Pythons may have fixed it.jenshnielsen commentedon Nov 18, 2026
Thansk for testing. I have not seen this in ci either for at least some time so lets close it
Sushant0X0 commentedon Nov 18, 2026
Happy to help Jens Hedegaard Nielsen (@jenshnielsen) , please tell me if I could be of any more disposal to you regarding some open issue.
Thank you