[2.10] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8154
Merged
[2.10] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8154
Conversation
* 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 Report✅ All modified and coverable lines are covered by tests. 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
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:
|
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.
lerman25
approved these changes
Jan 27, 2026
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 of #8129 to 2.10.
Note
Ensures accurate
FT.PROFILEtiming on cursored executions and strengthens profile parsing/testing.profileTotalTimefor intermediate cursor reads infinishSendChunk(final read still added inProfile_Print) and computesdurationonce per chunk for statsparse_resp2_shards_list,extract_profile_coordinator_and_shards,get_shards_profile)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/standaloneWritten by Cursor Bugbot for commit 618f2a3. This will update automatically on new commits. Configure here.