Conversation
add workers stats to state if will fail
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7609 +/- ##
==========================================
- Coverage 84.76% 84.74% -0.03%
==========================================
Files 351 351
Lines 54178 54204 +26
Branches 14553 14567 +14
==========================================
+ Hits 45925 45934 +9
- Misses 8062 8079 +17
Partials 191 191
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tests/pytests/common.py
Outdated
| t.start() | ||
|
|
||
| # Check for exceptions before proceeding | ||
| if exception_event.wait(timeout=1): |
There was a problem hiding this comment.
I think this can be error prone. What if exceptions simply work.
I would simply return the threads.
|
/backport |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-7609-to-2.8 origin/2.8
cd .worktree/backport-7609-to-2.8
git switch --create backport-7609-to-2.8
git cherry-pick -x 7db7c2e810384b67f8c9e97c9d707ab47bacdce0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-7609-to-2.10 origin/2.10
cd .worktree/backport-7609-to-2.10
git switch --create backport-7609-to-2.10
git cherry-pick -x 7db7c2e810384b67f8c9e97c9d707ab47bacdce0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.2
git worktree add -d .worktree/backport-7609-to-8.2 origin/8.2
cd .worktree/backport-7609-to-8.2
git switch --create backport-7609-to-8.2
git cherry-pick -x 7db7c2e810384b67f8c9e97c9d707ab47bacdce0 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.4
git worktree add -d .worktree/backport-7609-to-8.4 origin/8.4
cd .worktree/backport-7609-to-8.4
git switch --create backport-7609-to-8.4
git cherry-pick -x 7db7c2e810384b67f8c9e97c9d707ab47bacdce0 |
* [MOD-12069] Add `*_pending_jobs` metrics (#7556) * align info/* to active_coord * add APIs to get queues length * add to info * fix * test * fix test * catch general error * rename * fix moduleArgs * rename * rename test_active_worker_threads * rename to wworketrs (cherry picked from commit ea0476a) * [MOD-12831] `test_info_modules:test_pending_jobs_metrics_search` Extend output on timeout (#7609) * move queries to run_cmds_in_bg add workers stats to state if will fail * refcator run_cmds_in_bg (cherry picked from commit 7db7c2e)
* [MOD-12069] Add `*_pending_jobs` metrics (#7556) * align info/* to active_coord * add APIs to get queues length * add to info * fix * test * fix test * catch general error * rename * fix moduleArgs * rename * rename test_active_worker_threads * rename to wworketrs (cherry picked from commit ea0476a) * [MOD-12831] `test_info_modules:test_pending_jobs_metrics_search` Extend output on timeout (#7609) * move queries to run_cmds_in_bg add workers stats to state if will fail * refcator run_cmds_in_bg (cherry picked from commit 7db7c2e) * fix test
A flaky failure of this test was encounterd in cluster env on macos intel.
The test was introduced in #7556
This PR extends the output log in case of timeout.
Also, the previous mechnism to check if the query errored was wrong.
I moved the queries distribtion to a general callback in
common.pythat also detects better failures.Note
Adds a threading helper to run repeated commands with exception monitoring and updates pending-jobs metrics tests to use it and include worker stats for better timeout diagnostics.
launch_cmds_in_bg_with_exception_checkto runFT.SEARCH/FT.AGGREGATEin background and detect early failures.wait_for_conditionstate withWORKERS statsin checks for indexing pending jobs, query pending jobs, and metrics reset.WORKERS RESUMEand exit early to avoid deadlock.launch_cmds_in_bg_with_exception_check(env, command, num_triggers, exception_timeout)to spawn threads, monitor exceptions, and assert on failures.Written by Cursor Bugbot for commit 8f8fb49. This will update automatically on new commits. Configure here.