[2.10] [MOD-12694] [MOD-12069] Add active_worker_threads metric#7688
[2.10] [MOD-12694] [MOD-12069] Add active_worker_threads metric#7688
Conversation
* add "active_worker_threads" metric * fix declartion * remove coord threads * make the tests run... * introduce workersThreadPool_isInitialized assert is initizlied in GlobalStats_GetMultiThreadingStats * cleanup * rename workersThreadPool_isCreated * Unskip test_active_io_threads_stats Removed skip decorator from test_active_io_threads_stats. (cherry picked from commit d9574d8)
| t = threading.Thread( | ||
| target=call_and_store, | ||
| args=(runDebugQueryCommandPauseBeforeRPAfterN, | ||
| (env, [query_type, 'idx', '*'], 'Index', 0, ['INTERNAL_ONLY']), |
There was a problem hiding this comment.
Bug: Test incorrectly passes INTERNAL_ONLY for FT.SEARCH queries
The test_active_worker_threads test always passes ['INTERNAL_ONLY'] as extra_args for both FT.SEARCH and FT.AGGREGATE query types. Based on the established pattern in test_debug_commands.py (lines 1098 and 1223), INTERNAL_ONLY should only be passed when query_type == 'FT.AGGREGATE'. Passing it for FT.SEARCH queries is inconsistent with other tests and may cause unexpected test behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.10 #7688 +/- ##
==========================================
- Coverage 89.44% 89.42% -0.03%
==========================================
Files 210 210
Lines 36010 36025 +15
==========================================
+ Hits 32210 32214 +4
- Misses 3800 3811 +11
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:
|
backport #7538 to
2.10Note
Adds
active_worker_threadsto multi-threading stats and INFO output, wires it to workers thread pool, and updates/extends tests and helpers.active_worker_threadstoMultiThreadingStats(src/info/global_stats.h).workersThreadPool_WorkingThreadCount()inGlobalStats_GetMultiThreadingStats()(src/info/global_stats.c,#ifdef MT_BUILD).active_worker_threadsinAddToInfo_MultiThreading(src/info/info_redis.c).coord/src/rmr/test/test_io_runtime_ctx.c).call_and_storehelper and use it in debug tests (tests/pytests/common.py,tests/pytests/test_debug_commands.py).multi_threading.active_worker_threadsinitialization and runtime behavior, including pause/resume and drain (tests/pytests/test_info_modules.py).Written by Cursor Bugbot for commit 5530c52. This will update automatically on new commits. Configure here.