Skip to content

[8.4] [MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output (#7709)#7736

Merged
meiravgri merged 2 commits into8.4from
backport-7709-to-8.4
Dec 10, 2025
Merged

[8.4] [MOD-12414] Add Internal cursor reads metric to cluster FT.PROFILE output (#7709)#7736
meiravgri merged 2 commits into8.4from
backport-7709-to-8.4

Conversation

@meiravgri
Copy link
Copy Markdown
Collaborator

@meiravgri meiravgri commented Dec 10, 2025

backport #7709 to 8.4


Note

Expose per-shard "Internal cursor reads" in FT.PROFILE AGGREGATE and persist timeout state across cursor reads, with comprehensive RESP2/RESP3 tests.

  • Profiling / Execution:
    • Add AREQ.cursor_reads to track number of internal cursor reads; increment in runCursor.
    • Print "Internal cursor reads" in profile output for cursor-based (internal) requests (src/profile.c).
    • Accumulate timeouts across chunks: set req->has_timedout |= has_timedout and use it in ProfilePrinterCtx.
  • Aggregate Exec:
    • Use aggregated timeout flag in profile context for RESP2/RESP3 paths.
  • Tests:
    • Add tests validating Internal cursor reads presence/count for AGGREGATE under RESP2/RESP3, including timeout scenarios.
    • Update RESP3 profile expectations to include "Internal cursor reads" in shard profiles.

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

…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)
@meiravgri meiravgri requested a review from GuyAv46 December 10, 2025 17:04
@meiravgri meiravgri enabled auto-merge December 10, 2025 17:19
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.94%. Comparing base (58f374c) to head (08cf027).
⚠️ Report is 3 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7736      +/-   ##
==========================================
- Coverage   85.96%   85.94%   -0.02%     
==========================================
  Files         331      331              
  Lines       52954    52960       +6     
  Branches    11998    11998              
==========================================
- Hits        45524    45519       -5     
- Misses       7263     7274      +11     
  Partials      167      167              
Flag Coverage Δ
flow 84.55% <100.00%> (-0.41%) ⬇️
unit 52.60% <0.00%> (-0.01%) ⬇️

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 10, 2025
Merged via the queue into 8.4 with commit 7bbadb7 Dec 10, 2025
26 checks passed
@meiravgri meiravgri deleted the backport-7709-to-8.4 branch December 10, 2025 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants