Reduce io-threads modifiability test iterations under Valgrind#3980
Conversation
The 'test io-threads are runtime modifiable' test in unit/other toggles io-threads 100 times. Each toggle tears down and respawns real pthreads (pthread_create on grow, pthread_cancel + pthread_join on shrink) plus a drainIOThreadsQueue() pass, which is far slower under Valgrind. With the IO-threads redesign in place, the full run no longer fits in the test timeout on the dedicated Valgrind jobs. The same timeout appeared while the redesign was originally on unstable, went away when it was reverted, and returned once it was relanded. Reduce the loop to 10 iterations under Valgrind while keeping the full 100 in normal runs, preserving memcheck coverage of the thread spawn/teardown path. Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughTest server spawn notifications are restructured to pass log file paths, enabling test_helper to track and dump server logs on timeout for diagnostics. Additionally, the io-threads runtime modifiability test uses Valgrind-aware iteration count to reduce execution time under Valgrind. ChangesServer Log Diagnostics on Timeout
IO-threads Test Performance Optimization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## unstable #3980 +/- ##
============================================
+ Coverage 76.75% 76.91% +0.15%
============================================
Files 162 162
Lines 81017 81017
============================================
+ Hits 62187 62311 +124
+ Misses 18830 18706 -124 🚀 New features to boost your workflow:
|
zuiderkwast
left a comment
There was a problem hiding this comment.
Nice! Did you run daily on your branch to check that it fixes it?
When a test times out, the harness killed the server without ever printing its log, making timeouts hard to troubleshoot. The orchestrator only tracked server pids, not their log paths. Include the server's stdout log path in the server-spawned message and track it per-pid in the orchestrator. On timeout, dump the tail of each still-running server's log before the servers are killed. Addresses review feedback on valkey-io#3980. Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
The `test io-threads are runtime modifiable` test in `tests/unit/other.tcl` times out on the dedicated Valgrind jobs of the daily CI, failing the run. The failing test is introduced in #3938. This PR reduces the loop to 10 iterations under Valgrind. **Failure links:** - https://github.com/valkey-io/valkey/actions/runs/27386948127 (Jun 12) - https://github.com/valkey-io/valkey/actions/runs/27315974006 (Jun 11) - https://github.com/valkey-io/valkey/actions/runs/27245311034 (Jun 10) --------- Signed-off-by: Sarthak Aggarwal <sarthagg@amazon.com>
The
test io-threads are runtime modifiabletest intests/unit/other.tcltimes out on the dedicated Valgrind jobs of the daily CI, failing the run. The failing test is introduced in #3938.This PR reduces the loop to 10 iterations under Valgrind.
Failure links: