[8.4] [MOD-12627] Add Debug Support for FT.PROFILE Command#7573
[8.4] [MOD-12627] Add Debug Support for FT.PROFILE Command#7573redisearch-backport-pull-request[bot] merged 1 commit into8.4from
FT.PROFILE Command#7573Conversation
* imp debug profile for SA: introduce in mocule.h: RSProfileCommandImp RSProfileCommand calls RSProfileCommandImp(isDebug = false) for regular execution ProfileCommandCommand_DebugWrapper mcalls it with isDebug=true and skips _FT.DEBUG introduce entrypoint for _FT.DEBUG FT.PROFILE in debug_commands: ProfileCommandCommand_DebugWrapper RSProfileCommandImp calls DEBUG_execCommandCommon is its debug _recursiveProfilePrint skips printing debug RP * pass is debug instead of extracting: module.h: replace declaration: DistAggregateCommand DistSearchCommand with Imp version that receives isDebug expose ProfileCommandHandlerImp align debug_commands introducr _FT.DEBUG _FT.PROFILE * add test for cluster * return res * augi fixes * fix spell check * fix for real * fix test * skip tests according to env * revrt test_profile changes * reove changes from internal_only (cherry picked from commit 00ca3cf)
|
|
||
| case RP_PROFILE: | ||
| case RP_MAX: | ||
| default: |
There was a problem hiding this comment.
Bug: Missing RP types in profile switch statement
The switch statement in _recursiveProfilePrint doesn't handle RP_VECTOR_NORMALIZER, RP_HYBRID_MERGER, and RP_DEPLETER result processor types. These are valid non-debug RP types (defined before RP_MAX in the enum) that can appear in pipelines, especially in hybrid queries. When profiling encounters any of these types, it hits the default case which calls RS_ABORT("RPType error"), causing the process to abort. The early return added at line 79-82 only skips debug RPs (those > RP_MAX), so these three types still reach the switch statement.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.4 #7573 +/- ##
==========================================
- Coverage 85.94% 85.89% -0.06%
==========================================
Files 331 331
Lines 52593 52612 +19
Branches 12004 12004
==========================================
- Hits 45203 45190 -13
- Misses 7223 7255 +32
Partials 167 167
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:
|
Description
Backport of #7510 to
8.4.Note
Adds debug-mode execution for
FT.PROFILE(SEARCH/AGGREGATE) in SA and cluster, with wrappers, plumbing, and tests; profile output now skips debug RPs and surfaces timeout warnings.FT.PROFILE(FT.PROFILEand_FT.PROFILE) insrc/debug_commands.cwith shard/coord variants.RSProfileCommand→RSProfileCommandImp(..., isDebug); route toDEBUG_execCommandCommonwhen in debug mode.DistSearchCommandImp,DistAggregateCommandImp, andProfileCommandHandlerImp.DEBUG_execCommandCommonto parse debug params and execute query without debug args.RP_MAX_DEBUG); ensure timeout warning reported in profile/results....Imp(..., bool isDebug)signatures inmodule.h.aggregate_debug.h(remove FT.PROFILE limitation).FT.PROFILEdebug (RESP2/RESP3) validating structure, RP types, and timeout warnings.countFlatElementshelper in tests.Written by Cursor Bugbot for commit 18f6854. This will update automatically on new commits. Configure here.