Skip to content

[2.10] [MOD-12069] [MOD-12695] Add active_io_threads metric #7558

Merged
meiravgri merged 4 commits into2.10from
backport-7552-to-2.10
Dec 8, 2025
Merged

[2.10] [MOD-12069] [MOD-12695] Add active_io_threads metric #7558
meiravgri merged 4 commits into2.10from
backport-7552-to-2.10

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request bot commented Nov 27, 2025

Description

Backport of #7552 (originated from #7530) to 2.10.


Note

Adds active_io_threads metric tracked around IO callbacks and exposes it under INFO MODULES, with supporting tests and minimal APIs.

  • Metrics/Runtime:
    • Introduce MultiThreadingStats and new APIs GlobalStats_UpdateActiveIoThreads/GlobalStats_GetMultiThreadingStats in src/info/global_stats.{h,c}.
    • Track active IO callback execution in coord/src/rmr/rq.c by incrementing/decrementing active_io_threads around req->cb(...).
    • Add RQ_Debug_SetLoopReady() in coord/src/rmr/rq.{h,c} to mark loop ready (for tests) and trigger pending queues.
  • INFO output:
    • Add multi_threading section with active_io_threads in src/info/info_redis.c.
  • Tests:
    • Add C unit test coord/src/rmr/test/test_io_runtime_ctx.c verifying metric increments during a long-running callback and returns to 0.
    • Add Python test tests/pytests/test_info_modules.py::test_active_io_threads_stats validating INFO output and initial value.
    • Add C++ helper WaitForCondition in tests/cpptests/common.h.

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

* take things that has no diffrence

* remove unrelated changes in test_info_modules

* add io threads update to rqAsyncCb

* fix test

(cherry picked from commit d75adea)
meiravgri
meiravgri previously approved these changes Nov 27, 2025
@meiravgri meiravgri changed the title [2.10] [8.2] [MOD-12069] [MOD-12695] Add active_io_threads metric [2.10] [MOD-12069] [MOD-12695] Add active_io_threads metric Nov 27, 2025
@meiravgri meiravgri requested a review from JoanFM November 30, 2025 06:13
@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.29%. Comparing base (0911151) to head (51db8ca).
⚠️ Report is 6 commits behind head on 2.10.

Additional details and impacted files
@@            Coverage Diff             @@
##             2.10    #7558      +/-   ##
==========================================
- Coverage   89.31%   89.29%   -0.02%     
==========================================
  Files         207      207              
  Lines       35504    35522      +18     
==========================================
+ Hits        31711    31720       +9     
- Misses       3793     3802       +9     
Flag Coverage Δ
flow 83.86% <83.33%> (-0.16%) ⬇️
unit 42.61% <72.22%> (+0.22%) ⬆️

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.

JoanFM
JoanFM previously approved these changes Dec 1, 2025

SEARCH_PREFIX = 'search_'

# @skip(cluster=False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would remove this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the following pr :)

@redisearch-backport-pull-request redisearch-backport-pull-request bot added this pull request to the merge queue Dec 7, 2025
@oshadmi oshadmi removed this pull request from the merge queue due to a manual request Dec 7, 2025
@meiravgri meiravgri added this pull request to the merge queue Dec 8, 2025
Merged via the queue into 2.10 with commit 6ae791d Dec 8, 2025
17 checks passed
@meiravgri meiravgri deleted the backport-7552-to-2.10 branch December 8, 2025 17:33
@redisearch-backport-pull-request
Copy link
Contributor Author

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-7558-to-2.8 origin/2.8
cd .worktree/backport-7558-to-2.8
git switch --create backport-7558-to-2.8
git cherry-pick -x 6ae791d924c5317f0c890bcaa075b2d9baa547d8

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