[2.10] backport #7556 pending workers + #7609 test fix#7738
Conversation
* 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)
|
|
||
| def test_pending_jobs_metrics_aggregate(): | ||
| env = Env(moduleArgs='DEFAULT_DIALECT 2') | ||
| _test_pending_jobs_metrics(env, 'AGGREGATE') |
There was a problem hiding this comment.
Bug: Missing @skip(noWorkers=True) for worker-dependent tests
The new test functions test_pending_jobs_metrics_search and test_pending_jobs_metrics_aggregate require worker thread pool functionality but are missing the @skip(noWorkers=True) decorator. Other similar tests in this file like test_active_worker_threads (line 906) and test_counting_queries_BG (line 475) correctly use this decorator. Without it, these tests will fail in environments where workers support is not available (non-MT_BUILD configurations), as they attempt to configure workers, pause the worker thread pool, and check worker-specific metrics.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.10 #7738 +/- ##
==========================================
- Coverage 89.45% 89.43% -0.03%
==========================================
Files 210 210
Lines 36073 36087 +14
==========================================
+ Hits 32270 32275 +5
- Misses 3803 3812 +9
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:
|
#7556: MOD-12069 Add *_pending_jobs metrics
#7609: MOD-12831 test_info_modules:test_pending_jobs_metrics_search Extend output on timeout
Note
Adds high/low-priority workers pending-jobs metrics to INFO MODULES, backed by new thpool/workers accessors, and introduces tests/utilities validating these stats.
workers_low_priority_pending_jobsandworkers_high_priority_pending_jobstomulti_threadingsection inINFO MODULES(src/info/global_stats.{c,h},src/info/info_redis.c).MultiThreadingStatswith corresponding fields and populate via workers threadpool without extra locking.deps/thpool/thpool.{h,c}:redisearch_thpool_high_priority_pending_jobsandredisearch_thpool_low_priority_pending_jobs(atomic reads).src/util/workers.{h,c}):workersThreadPool_HighPriorityPendingJobsCount,workersThreadPool_LowPriorityPendingJobsCount.wait_for_conditionandlaunch_cmds_in_bg_with_exception_checkintests/pytests/common.py.load_vectors_to_redisacceptdimandvec_field_name.tests/pytests/test_info_modules.pywith multi-threading metrics validations (active threads and pending jobs for SEARCH/AGGREGATE).Written by Cursor Bugbot for commit b9e289a. This will update automatically on new commits. Configure here.