[MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output#7709
[MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output#7709
Internal cursor reads metric to cluster FT.PROFILE output#7709Conversation
update in runCursor print in Profile_Print if cursor
Internal cursor reads metric to cluster FT.PROFILE output
Use |= instead of = to ensure has_timedout remains true once set, preventing earlier cursor read warnings from being lost in final output.
tests/pytests/test_profile.py
Outdated
| env.assertEqual(len(res[0]) - 1, num_docs) | ||
|
|
||
| shards_profile = get_shards_profile(env, res) | ||
| env.assertEqual(len(shards_profile), env.shardsCount) |
There was a problem hiding this comment.
Consider adding the shards_profile as a message on failure
tests/pytests/test_profile.py
Outdated
| res = env.cmd('FT.PROFILE', 'idx', 'AGGREGATE', 'QUERY', '*') | ||
|
|
||
| shards_profile = get_shards_profile(env, res) | ||
| env.assertEqual(len(shards_profile), env.shardsCount) |
There was a problem hiding this comment.
Consider adding the shards_profile as a message on failure
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7709 +/- ##
==========================================
- Coverage 84.84% 84.83% -0.02%
==========================================
Files 349 349
Lines 54413 54551 +138
Branches 14500 14632 +132
==========================================
+ Hits 46169 46278 +109
- Misses 8049 8076 +27
- Partials 195 197 +2
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 failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-7709-to-2.8 origin/2.8
cd .worktree/backport-7709-to-2.8
git switch --create backport-7709-to-2.8
git cherry-pick -x 005186a403e44e718c6094925a55ad651afc05cf |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-7709-to-2.10 origin/2.10
cd .worktree/backport-7709-to-2.10
git switch --create backport-7709-to-2.10
git cherry-pick -x 005186a403e44e718c6094925a55ad651afc05cf |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.2
git worktree add -d .worktree/backport-7709-to-8.2 origin/8.2
cd .worktree/backport-7709-to-8.2
git switch --create backport-7709-to-8.2
git cherry-pick -x 005186a403e44e718c6094925a55ad651afc05cf |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 8.4
git worktree add -d .worktree/backport-7709-to-8.4 origin/8.4
cd .worktree/backport-7709-to-8.4
git switch --create backport-7709-to-8.4
git cherry-pick -x 005186a403e44e718c6094925a55ad651afc05cf |
…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)
…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)
…OFILE output (#7709) (#7736) * [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 IsCursor
…OFILE output (#7737) [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)
…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)
…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
[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)
…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)
…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
Summary
Adds a new metric
Internal cursor readstoFT.PROFILEshard profiles that tracks the number of cursor reads performed during distributed aggregate operations.Changes
Feature: Track internal cursor reads
cursor_readsfield toAREQstruct to count cursor read operationsrunCursor()for each cursor read (initial + subsequent reads)IsCursor(req)is trueBug Fix
Preserve timeout flag across cursor reads in cluster FT.PROFILE
Use
|=instead of=to ensurehas_timedoutremains true once set, preventing earlier cursor read warnings from being lost in final output.Note
Add shard-level
Internal cursor readsmetric to FT.PROFILE AGGREGATE and ensure timeout state persists across cursor reads.Internal cursor readsin profile output.AREQ::cursor_readsand increment inrunCursor(); print metric inProfile_Print()whenIsCursor(req).req->has_timedout |= has_timedoutand passreq->has_timedoutto profile context in both RESP2/RESP3 paths.Internal cursor reads, including timeout scenarios and coordinator behavior.Internal cursor reads.Written by Cursor Bugbot for commit 21f2b68. This will update automatically on new commits. Configure here.