[2.8] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8163
Merged
[2.8] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time#8163
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.8 #8163 +/- ##
==========================================
- Coverage 87.68% 87.67% -0.01%
==========================================
Files 203 203
Lines 35354 35356 +2
==========================================
- Hits 31001 31000 -1
- Misses 4353 4356 +3
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:
|
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.
- 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.
lerman25
approved these changes
Jan 28, 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.8.
Note
Ensures
FT.PROFILEreports accurate shard "Total profile time" when results are fetched via cursors.aggregate_exec.c, accumulatereq->profileTotalTimefor intermediate cursor reads by measuring per-read duration and adding it before final profile print; reusedurationfor global statsTotal 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 protocolsWritten by Cursor Bugbot for commit b72aed9. This will update automatically on new commits. Configure here.