Skip to content

[8.6] Fix Profile Print on Missing Value - [MOD-10560]#9047

Merged
GuyAv46 merged 2 commits into8.6from
guyav-MOD-10560-8.6
Apr 15, 2026
Merged

[8.6] Fix Profile Print on Missing Value - [MOD-10560]#9047
GuyAv46 merged 2 commits into8.6from
guyav-MOD-10560-8.6

Conversation

@GuyAv46
Copy link
Copy Markdown
Collaborator

@GuyAv46 GuyAv46 commented Apr 14, 2026

Describe the changes in the pull request

8.6 variant of #9051

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

Note

Low Risk
Low risk: changes only the FT.PROFILE iterator metadata output and adds coverage for missing-field queries, without affecting query execution or data handling paths.

Overview
Fixes FT.PROFILE iterator printing to correctly label inverted-index iterators as WILDCARD (when isWildcard) or MISSING (for ismissing(@field)), including the missing field name in the profile output.

Adds a regression test covering ismissing(@t) and -ismissing(@t) to validate the new profile output structure.

Reviewed by Cursor Bugbot for commit 9c338df. Bugbot is set up for automated code reviews on this repo. Configure here.

@GuyAv46 GuyAv46 requested a review from raz-mon April 14, 2026 10:16
@GuyAv46 GuyAv46 added the bug label Apr 14, 2026
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Apr 14, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

env.assertEqual(actual_res[0], [1, '2'])
env.assertEqual(actual_res[1][1][0][3], ['Type', 'MISSING', 'Field', 't', 'Number of reading operations', 2, 'Estimated number of matches', 1])

actual_res = conn.execute_command('ft.profile', 'idx', 'search', 'query', '-ismissing(@t)', 'nocontent')
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing DIALECT parameter in second test query

High Severity

The second query in testProfileMissingFieldQuery omits 'DIALECT', 2 when calling ft.profile with -ismissing(@t). The ismissing function is only recognized by the v2 parser (dialect 2+), and the default dialect is 1 (defined as DEFAULT_DIALECT_VERSION 1 in config.h). The first query on line 287 correctly passes 'DIALECT', 2, but the second does not. This means the query won't be parsed as a missing-field query, and the assertions on lines 292–294 expecting 'Type', 'MISSING' in the profile output will fail.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit a77dc5e. Configure here.

Comment thread src/profile/profile.c
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.84%. Comparing base (1f60697) to head (9c338df).
⚠️ Report is 3 commits behind head on 8.6.

Files with missing lines Patch % Lines
src/profile/profile.c 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              8.6    #9047      +/-   ##
==========================================
- Coverage   83.88%   83.84%   -0.04%     
==========================================
  Files         367      367              
  Lines       55818    55825       +7     
  Branches    14322    14322              
==========================================
- Hits        46821    46806      -15     
- Misses       8835     8857      +22     
  Partials      162      162              
Flag Coverage Δ
flow 84.69% <87.50%> (-0.08%) ⬇️
unit 50.70% <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.

Copy link
Copy Markdown

@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.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9c338df. Configure here.

Comment thread src/profile/profile.c
@sonarqubecloud
Copy link
Copy Markdown

@GuyAv46 GuyAv46 enabled auto-merge April 14, 2026 12:46
@GuyAv46 GuyAv46 requested a review from raz-mon April 14, 2026 13:28
@skip(cluster=True)
def testProfileMissingFieldQuery(env):
conn = getConnectionByEnv(env)
env.cmd(config_cmd(), 'SET', '_PRINT_PROFILE_CLOCK', 'false')
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't backport the true case

@GuyAv46 GuyAv46 added this pull request to the merge queue Apr 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 14, 2026
@GuyAv46 GuyAv46 added this pull request to the merge queue Apr 15, 2026
Merged via the queue into 8.6 with commit a50f641 Apr 15, 2026
50 checks passed
@GuyAv46 GuyAv46 deleted the guyav-MOD-10560-8.6 branch April 15, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants