Skip to content

[2.8] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8163

Merged
ofiryanai merged 7 commits into2.8from
backport-8129-to-2.8
Jan 28, 2026
Merged

[2.8] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8163
ofiryanai merged 7 commits into2.8from
backport-8129-to-2.8

Conversation

@ofiryanai
Copy link
Contributor

@ofiryanai ofiryanai commented Jan 25, 2026

Backport of #8129 to 2.8.


Note

Ensures FT.PROFILE reports accurate shard "Total profile time" when results are fetched via cursors.

  • In aggregate_exec.c, accumulate req->profileTotalTime for intermediate cursor reads by measuring per-read duration and adding it before final profile print; reuse duration for global stats
  • Test suite: add RESP2/RESP3 helpers to normalize coordinator/shard profiles; new consistency tests verify Total profile time >= sum(Result processors Time) across SEARCH/AGGREGATE, cluster and standalone; expand shard parsing and cursor-read assertions (e.g., "Internal cursor reads"); keep timeout/coordinator tests compatible with both protocols

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

@ofiryanai ofiryanai requested a review from lerman25 January 25, 2026 15:41
ofiryanai and others added 2 commits January 25, 2026 17:50
* Fix FT.PROFILE shard total profile time

* Avoid double count on non-cursor Timeout Return failures

* Move out of the if (Ok | Timeout) block

* Add tests

* Enhance tests to cover more cases

(cherry picked from commit fd63e0c)
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.67%. Comparing base (9582f80) to head (b72aed9).
⚠️ Report is 1 commits behind head on 2.8.

Additional details and impacted files
@@            Coverage Diff             @@
##              2.8    #8163      +/-   ##
==========================================
- Coverage   87.68%   87.67%   -0.01%     
==========================================
  Files         203      203              
  Lines       35354    35356       +2     
==========================================
- Hits        31001    31000       -1     
- Misses       4353     4356       +3     
Flag Coverage Δ
flow 82.14% <100.00%> (-0.18%) ⬇️
unit 42.09% <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.

@ofiryanai ofiryanai enabled auto-merge January 25, 2026 16:28
Fixed parse_resp2_shards_list and standalone format parsing to use
item[1:] instead of item[1] to capture ALL values after the key.
This fixes multi-valued fields like 'Result processors profile'
which have format ['key', val1, val2, ...].

Added single-element unwrapping to maintain backward compatibility.
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

- Check for both 'shards'/'Shards' and 'coordinator'/'Coordinator' keys
- Filter out Coordinator from shards list (has 'Total Coordinator time' not 'Total profile time')
- Handle standalone mode with 'profile' key
Filter out entries with 'Total Coordinator time' key instead of filtering
for entries with 'Total profile time', since shards may not always have
the 'Total profile time' field.
@ofiryanai ofiryanai added this pull request to the merge queue Jan 28, 2026
Merged via the queue into 2.8 with commit 6f071b0 Jan 28, 2026
11 checks passed
@ofiryanai ofiryanai deleted the backport-8129-to-2.8 branch January 28, 2026 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants