Skip to content

[2.8] [MOD-12627] Add Debug Support for FT.PROFILE Command#7662

Merged
meiravgri merged 1 commit into2.8from
backport-7510-to-2.8
Dec 7, 2025
Merged

[2.8] [MOD-12627] Add Debug Support for FT.PROFILE Command#7662
meiravgri merged 1 commit into2.8from
backport-7510-to-2.8

Conversation

@meiravgri
Copy link
Collaborator

@meiravgri meiravgri commented Dec 7, 2025

backport #7510 to 2.8

  • Not supported on cluster

Note

Adds a debug variant of FT.PROFILE (via FT.DEBUG FT.PROFILE) with execution routing and profile printing safeguards; updates debug help and adds tests for RESP2/3.

  • Debug Commands:
    • Introduce RSProfileCommandImp(.., isDebug) and route FT.DEBUG FT.PROFILE to debug execution (DEBUG_execCommandCommon) with EXEC_DEBUG.
    • Register new shard-level debug command FT.PROFILE in FT.DEBUG help/dispatch table.
  • Execution/Parsing:
    • Refactor RSProfileCommand to delegate to RSProfileCommandImp; select handler via function pointer (execCommandCommon vs DEBUG_execCommandCommon).
  • Profiling:
    • In _recursiveProfilePrint, guard against RP types beyond RP_MAX (allow debug range) and simplify switch default to abort on invalid types.
  • Tests:
    • Add debug PROFILE tests validating timeout behavior and profile structure parity (RESP2/RESP3) and extend debug help list.
    • Add countFlatElements helper for profile structure checks.

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

@meiravgri meiravgri enabled auto-merge December 7, 2025 11:18
@meiravgri meiravgri requested a review from lerman25 December 7, 2025 11:19
@codecov
Copy link

codecov bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.57%. Comparing base (c500ddb) to head (9212bee).
⚠️ Report is 2 commits behind head on 2.8.

Files with missing lines Patch % Lines
src/profile.c 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              2.8    #7662      +/-   ##
==========================================
- Coverage   87.61%   87.57%   -0.05%     
==========================================
  Files         203      203              
  Lines       35102    35115      +13     
==========================================
- Hits        30755    30751       -4     
- Misses       4347     4364      +17     
Flag Coverage Δ
flow 81.95% <93.33%> (-0.26%) ⬇️
unit 42.32% <0.00%> (-0.02%) ⬇️

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.

@meiravgri meiravgri added this pull request to the merge queue Dec 7, 2025
Merged via the queue into 2.8 with commit 306ce8e Dec 7, 2025
13 checks passed
@meiravgri meiravgri deleted the backport-7510-to-2.8 branch December 7, 2025 13:10
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