Skip to content

[2.10] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8154

Merged
ofiryanai merged 8 commits into2.10from
backport-8129-to-2.10
Jan 27, 2026
Merged

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

Conversation

@ofiryanai
Copy link
Contributor

@ofiryanai ofiryanai commented Jan 25, 2026

Backport of #8129 to 2.10.


Note

Ensures accurate FT.PROFILE timing on cursored executions and strengthens profile parsing/testing.

  • Accumulates profileTotalTime for intermediate cursor reads in finishSendChunk (final read still added in Profile_Print) and computes duration once per chunk for stats
  • Adds RESP2/RESP3 parsing helpers to extract coordinator/shard profiles (parse_resp2_shards_list, extract_profile_coordinator_and_shards, get_shards_profile)
  • New tests cover: reporting of Internal cursor reads, timeout handling differences between RESP2 and RESP3, partial consumption of results, and timing consistency (Total profile time >= sum of RP times) across SEARCH/AGGREGATE, cluster/standalone

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

* 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)
@ofiryanai ofiryanai requested a review from lerman25 January 25, 2026 09:49
@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.44%. Comparing base (9995925) to head (618f2a3).
⚠️ Report is 1 commits behind head on 2.10.

Additional details and impacted files
@@            Coverage Diff             @@
##             2.10    #8154      +/-   ##
==========================================
- Coverage   89.48%   89.44%   -0.05%     
==========================================
  Files         210      210              
  Lines       36267    36271       +4     
==========================================
- Hits        32453    32442      -11     
- Misses       3814     3829      +15     
Flag Coverage Δ
flow 84.11% <100.00%> (-0.17%) ⬇️
unit 42.21% <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 15:11
Original get_shards_profile only handled FT.AGGREGATE (assumed res['Shards']).
FT.SEARCH has different structure: lowercase 'shards' with nested Coordinator
(RESP3), different flat list format (RESP2).

New extract_profile_coordinator_and_shards handles all 4 cases (FT.SEARCH/
FT.AGGREGATE × RESP2/RESP3) and extracts Coordinator data needed by
testProfileTotalTimeConsistencyCluster* tests.
Handle standalone mode in extract_profile_coordinator_and_shards by
returning empty coordinator and shards when not in cluster mode.
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.

@ofiryanai ofiryanai added this pull request to the merge queue Jan 27, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 27, 2026
@ofiryanai ofiryanai added this pull request to the merge queue Jan 27, 2026
Merged via the queue into 2.10 with commit c5378c4 Jan 27, 2026
15 checks passed
@ofiryanai ofiryanai deleted the backport-8129-to-2.10 branch January 27, 2026 14:19
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