[2.10] [MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output#7746
Merged
[2.10] [MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output#7746
Internal cursor reads metric to cluster FT.PROFILE output#7746Conversation
…output (#7709) * add cursor_reads to req struct update in runCursor print in Profile_Print if cursor * Fix: Preserve timeout flag across cursor reads in cluster FT.PROFILE Use |= instead of = to ensure has_timedout remains true once set, preventing earlier cursor read warnings from being lost in final output. * fix test * fix test * add message to the test (cherry picked from commit 005186a)
GuyAv46
previously approved these changes
Dec 11, 2025
Comment on lines
+257
to
+262
| // Only internal requests can use profile with cursor. | ||
| RS_ASSERT(IsInternal(req)); | ||
| RedisModule_Reply_Array(reply); | ||
| RedisModule_Reply_SimpleString(reply, "Internal cursor reads"); | ||
| RedisModule_Reply_LongLong(reply, req->cursor_reads); | ||
| RedisModule_Reply_ArrayEnd(reply); |
GuyAv46
previously approved these changes
Dec 11, 2025
GuyAv46
approved these changes
Dec 11, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.10 #7746 +/- ##
==========================================
- Coverage 89.46% 89.43% -0.03%
==========================================
Files 210 210
Lines 36087 36138 +51
==========================================
+ Hits 32284 32319 +35
- Misses 3803 3819 +16
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:
|
Collaborator
Author
|
/backport |
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-7746-to-2.8 origin/2.8
cd .worktree/backport-7746-to-2.8
git switch --create backport-7746-to-2.8
git cherry-pick -x 1911f5b89a740627ec5aeebd9153bb4b3249af01 |
meiravgri
added a commit
that referenced
this pull request
Dec 11, 2025
…ROFILE output (#7746) * [MOD-12414] Add `Internal cursor reads` metric to cluster FT.PROFILE output (#7709) * add cursor_reads to req struct update in runCursor print in Profile_Print if cursor * Fix: Preserve timeout flag across cursor reads in cluster FT.PROFILE Use |= instead of = to ensure has_timedout remains true once set, preventing earlier cursor read warnings from being lost in final output. * fix test * fix test * add message to the test (cherry picked from commit 005186a) * fix test * fix test * fix test (cherry picked from commit 1911f5b)
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 14, 2025
…OFILE output (#7751) * cp master [MOD-12414] Add `Internal cursor reads` metric to cluster FT.PROFILE output (#7709) * add cursor_reads to req struct update in runCursor print in Profile_Print if cursor * Fix: Preserve timeout flag across cursor reads in cluster FT.PROFILE Use |= instead of = to ensure has_timedout remains true once set, preventing earlier cursor read warnings from being lost in final output. * fix test * fix test * add message to the test (cherry picked from commit 005186a) * [2.10] [MOD-12414] Add `Internal cursor reads` metric to cluster FT.PROFILE output (#7746) * [MOD-12414] Add `Internal cursor reads` metric to cluster FT.PROFILE output (#7709) * add cursor_reads to req struct update in runCursor print in Profile_Print if cursor * Fix: Preserve timeout flag across cursor reads in cluster FT.PROFILE Use |= instead of = to ensure has_timedout remains true once set, preventing earlier cursor read warnings from being lost in final output. * fix test * fix test * add message to the test (cherry picked from commit 005186a) * fix test * fix test * fix test (cherry picked from commit 1911f5b) * minimal test for timeout * remove new code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport #7709 to 2.10
Note
Adds an "Internal cursor reads" counter to FT.PROFILE AGGREGATE outputs (RESP2/3) and accumulates timeout state across cursor reads.
Internal cursor readsto shard profiles inFT.PROFILE AGGREGATE(RESP2/RESP3); only for internal cursor requests.has_timedoutacross cursor reads and use cumulative value in profile output.AREQwithcursor_reads; increment on each cursor execution (runCursor).req->has_timedout |= ...and propagate toProfilePrinterCtx.Internal cursor readsunder normal and timeout scenarios for RESP2/RESP3.Written by Cursor Bugbot for commit 4dcb8c7. This will update automatically on new commits. Configure here.