Skip to content

[8.4] [MOD-12647] fix: handle the case in Coordinator when SCORE is sent alone without extra fields.#7553

Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7492-to-8.4
Nov 27, 2025
Merged

[8.4] [MOD-12647] fix: handle the case in Coordinator when SCORE is sent alone without extra fields.#7553
redisearch-backport-pull-request[bot] merged 1 commit into8.4from
backport-7492-to-8.4

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

@redisearch-backport-pull-request redisearch-backport-pull-request bot commented Nov 27, 2025

Description

Backport of #7492 to 8.4.


Note

Safely handle hybrid results that contain a score without fields (e.g., expired docs), add RESP3-aware parsing helper, and introduce RESP2/3 FT.HYBRID expiration tests.

  • Coordinator (rpnet):
    • Handle RESP3 rows where extra_attributes may be absent (e.g., expired docs): introduce has_fields and iterate fields only when present.
    • Keep optional score handling; relax assertions to allow missing fields in RESP2/RESP3 while validating lengths when present.
  • Tests:
    • Add expire_ft_hybrid_test and run for both RESP2/RESP3 to verify only non-expired docs are returned and attributes present.
    • Enhance get_results_from_hybrid_response to parse RESP3 dict replies and return (results, total_results).

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

…one without extra fields. (#7492)

* fix: Do not send score alone if Expired flag is set

* test: add test_expire_ft_hybrid

* improve test

* do not send NULL, simply avoid serialize result if expired

* improving test

* handle more complete hybrid expire test

* small change in test

* revert changes in hybrid exec

* remove assertion that cannot be guaranteed, and handle no extra_attributes in response from shard

* handle both resp protocols

(cherry picked from commit b916f07)
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.88%. Comparing base (a4993de) to head (70656cd).
⚠️ Report is 1 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #7553      +/-   ##
==========================================
- Coverage   85.91%   85.88%   -0.03%     
==========================================
  Files         330      330              
  Lines       52519    52521       +2     
  Branches    12001    12001              
==========================================
- Hits        45120    45108      -12     
- Misses       7232     7246      +14     
  Partials      167      167              
Flag Coverage Δ
flow 84.45% <100.00%> (-0.14%) ⬇️
unit 52.49% <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.

@redisearch-backport-pull-request redisearch-backport-pull-request bot added this pull request to the merge queue Nov 27, 2025
Merged via the queue into 8.4 with commit de58fcb Nov 27, 2025
32 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-7492-to-8.4 branch November 27, 2025 15:43
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.

1 participant