Skip to content

[8.2] [MOD-12694] [MOD-12069] Add active_coord_threads metric#7623

Merged
meiravgri merged 2 commits into8.2from
backport-7546-to-8.2
Dec 3, 2025
Merged

[8.2] [MOD-12694] [MOD-12069] Add active_coord_threads metric#7623
meiravgri merged 2 commits into8.2from
backport-7546-to-8.2

Conversation

@meiravgri
Copy link
Collaborator

@meiravgri meiravgri commented Dec 3, 2025

backport of #7546 to 8.2.

MOD-12823 Also fix TestMetricUpdateDuringCallback race condition (pr #7605 )


Note

Expose coordinator thread activity as active_coord_threads in INFO MODULES, add supporting API, remove unused worker check, and update tests (including race fix).

  • Metrics / INFO MODULES:
    • Add active_coord_threads to MultiThreadingStats, computed via ConcurrentSearchPool_WorkingThreadCount() and exposed in AddToInfo_MultiThreading as search_active_coord_threads.
  • Coordinator thread pool / C API:
    • Implement ConcurrentSearchPool_WorkingThreadCount() in src/concurrent_ctx.c and declare in concurrent_ctx.h.
    • Add C++ linkage guards (extern "C") to concurrent_ctx.h and coord/rmr/rq.h.
  • Workers:
    • Remove workersThreadPool_isCreated() and its usage/assertion.
  • Tests:
    • C++: create/destroy coordinator pool and fix race in TestMetricUpdateDuringCallback.
    • Python: validate active_coord_threads (0 when idle; equals paused query count for coordinator on FT.AGGREGATE in cluster) and include field in multi-threading checks.

Written by Cursor Bugbot for commit 202b21d. This will update automatically on new commits. Configure here.

@meiravgri meiravgri changed the title [8.2] [MOD-12694] [MOD-12069] Add active_coord_threads metric #7546 [8.2] [MOD-12694] [MOD-12069] Add active_coord_threads metric Dec 3, 2025
@github-actions github-actions bot added the size:S label Dec 3, 2025
@meiravgri meiravgri enabled auto-merge December 3, 2025 05:13
@meiravgri meiravgri requested a review from JoanFM December 3, 2025 05:39
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.49%. Comparing base (cb09ff5) to head (202b21d).
⚠️ Report is 11 commits behind head on 8.2.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.2    #7623      +/-   ##
==========================================
- Coverage   89.50%   89.49%   -0.02%     
==========================================
  Files         253      253              
  Lines       41202    41205       +3     
  Branches     3725     3725              
==========================================
- Hits        36879    36875       -4     
- Misses       4274     4281       +7     
  Partials       49       49              
Flag Coverage Δ
flow 82.16% <100.00%> (-0.29%) ⬇️
unit 47.50% <83.33%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@meiravgri meiravgri added this pull request to the merge queue Dec 3, 2025
Merged via the queue into 8.2 with commit a8ecd32 Dec 3, 2025
23 checks passed
@meiravgri meiravgri deleted the backport-7546-to-8.2 branch December 3, 2025 08:30
@meiravgri
Copy link
Collaborator Author

/backport

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.8, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.8
git worktree add -d .worktree/backport-7623-to-2.8 origin/2.8
cd .worktree/backport-7623-to-2.8
git switch --create backport-7623-to-2.8
git cherry-pick -x a8ecd326dc02358ae1171787f60bc233fce1cff2

@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.10, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.10
git worktree add -d .worktree/backport-7623-to-2.10 origin/2.10
cd .worktree/backport-7623-to-2.10
git switch --create backport-7623-to-2.10
git cherry-pick -x a8ecd326dc02358ae1171787f60bc233fce1cff2

meiravgri added a commit that referenced this pull request Dec 7, 2025
* backport 7546

* move idfed cpp

(cherry picked from commit a8ecd32)
github-merge-queue bot pushed a commit that referenced this pull request Dec 10, 2025
* align to Add active_worker_threads metric #7645

* [2.8] [MOD-12694] [MOD-12069] Add active_coord_threads metric (#7623)

* backport 7546

* move idfed cpp

(cherry picked from commit a8ecd32)

* fix calling coord func from SA

* fix declartion

* clenaups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants