Skip to content

Backport #4575 to 7.5.x: fix FT.HYBRID COMBINE arg count for YIELD_SCORE_AS - #4576

Merged
ggivo merged 1 commit into
7.5.xfrom
topic/ggivo/backport/4575-7.5.x
Jun 26, 2026
Merged

ggivo merged 1 commit into
7.5.xfrom
topic/ggivo/backport/4575-7.5.x

Conversation

@ggivo

@ggivo ggivo commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

Backport of #4575 to 7.5.x.

Cherry-picked commit 7fdb4e4f. Includes the COMBINE arg-count fix plus CombinersTest and the FT.HYBRID YIELD_SCORE_AS integration tests (RRF and LINEAR).

Fixes #4574 on the 7.5.x line.


Note

Low Risk
Narrow protocol-serialization fix in experimental FT.HYBRID combiners, with unit and integration tests; no auth or data-path changes.

Overview
Fixes FT.HYBRID failures when a score combiner uses Combiner.as(...) to alias the combined score (#4574).

Combiner.addParams now sets the COMBINE clause argument count to ownArgs.size() plus two when a score alias is present, so YIELD_SCORE_AS and the alias name are counted inside the clause instead of being treated as stray arguments Redis rejects.

Adds CombinersTest for LINEAR/RRF serialization (including alias regression cases) and a parameterized integration test on FTHybridCommandsTestBase that asserts the combined score is returned under the alias for LINEAR and RRF.

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

…#4575)

* Fix FT.HYBRID COMBINE arg count to include YIELD_SCORE_AS tokens

Combiner.addParams wrote the COMBINE <method> <count> using only the
method-specific tokens (WINDOW/CONSTANT/ALPHA/BETA). When a combined-score
alias was set via .as(...), the two appended YIELD_SCORE_AS <alias> tokens
fell outside that count, so Redis read past the clause and rejected the
command with "YIELD_SCORE_AS: Unknown argument".

Count the two alias tokens when an alias is present. The fix lives in the
shared final addParams, so it covers both RRF and LINEAR combiners.

Add CombinersTest with protocol-level serialization coverage for both
combiners (each parameter alone and combined, plus the empty default) and
the YIELD_SCORE_AS alias cases that regress this bug.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test: add FT.HYBRID YIELD_SCORE_AS integration test for RRF and LINEAR

* format

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: ggivo <ivo.gaydazhiev@redis.com>
(cherry picked from commit 7fdb4e4)
@ggivo ggivo added the bug label Jun 26, 2026
@jit-ci

jit-ci Bot commented Jun 26, 2026

Copy link
Copy Markdown

πŸ›‘οΈ Jit Security Scan Results

CRITICAL HIGH MEDIUM

βœ… No security findings were detected in this PR


Security scan by Jit

@ggivo ggivo added this to the 7.5.3 milestone Jun 26, 2026
@ggivo ggivo self-assigned this Jun 26, 2026
@github-actions

github-actions Bot commented Jun 26, 2026 •

Copy link
Copy Markdown

Test Results

β€‡β€‡β€ˆ305 files  + 1β€‚β€ƒβ€‡β€‡β€ˆ305 suites  +1   11m 56s ⏱️ + 1m 3s
10β€ˆ981 tests +44  10β€ˆ925 βœ… +1β€ˆ460  56 πŸ’€  -β€Š1β€ˆ416  0 ❌ Β±0 
 5β€ˆ680 runsβ€Š +34   5β€ˆ671 βœ… +β€‡β€ˆ516   9 πŸ’€  -β€Šβ€‡β€ˆ482  0 ❌ Β±0 

Results for commit 41ba16f. ± Comparison against base commit dd42b3e.

♻️ This comment has been updated with latest results.

@ggivo
ggivo merged commit 458bccf into 7.5.x Jun 26, 2026
11 of 13 checks passed
@ggivo
ggivo deleted the topic/ggivo/backport/4575-7.5.x branch July 1, 2026 06:55
mergify Bot added a commit to ArcadeData/arcadedb that referenced this pull request Jul 1, 2026
Bumps [redis.clients:jedis](https://github.com/redis/jedis) from 7.5.2 to 7.5.3.
Release notes

*Sourced from [redis.clients:jedis's releases](https://github.com/redis/jedis/releases).*

> 7.5.3
> -----
>
> This is a maintenance release with fixes for FT.HYBRID queries and connection pool handshake overhead. Recommended for any deployment using FT.HYBRID with `Combiner.as(...)` or `MultiDbClient`.
>
> πŸ› Bug Fixes
> -----------
>
> * Fixes `FT.HYBRID` `COMBINE` argument count omitting `YIELD_SCORE_AS` tokens, causing the command to be rejected when a combined-score alias is set via `Combiner.as(...)`. Fix by [`@​guyroyse`](https://github.com/guyroyse) in [redis/jedis#4575](https://redirect.github.com/redis/jedis/pull/4575), backported to `7.5.x` in [redis/jedis#4576](https://redirect.github.com/redis/jedis/pull/4576).
> * Fixes double initialization of a pooled `Connection` in `TrackingConnectionPool` (used by `MultiDbClient`). [redis/jedis#4547](https://redirect.github.com/redis/jedis/pull/4547), backported to `7.5.x` in <redis/jedis@dd42b3e>.
>
> **Full Changelog**: <redis/jedis@v7.5.2...v7.5.3>


Commits

* [`d0ca056`](redis/jedis@d0ca056) Add Redis 8.8 GA to test matrix on 7.5.x ([#4578](https://redirect.github.com/redis/jedis/issues/4578))
* [`2e73f17`](redis/jedis@2e73f17) Backport [#4571](https://redirect.github.com/redis/jedis/issues/4571) and [#4573](https://redirect.github.com/redis/jedis/issues/4573) to 7.5.x: stabilize XINFO STREAM tests ([#4577](https://redirect.github.com/redis/jedis/issues/4577))
* [`458bccf`](redis/jedis@458bccf) Backport [#4575](https://redirect.github.com/redis/jedis/issues/4575) to 7.5.x: fix FT.HYBRID COMBINE arg count for YIELD\_SCORE\_AS (...
* [`dd42b3e`](redis/jedis@dd42b3e) [7.5] Backport [#4547](https://redirect.github.com/redis/jedis/issues/4547): Fix double initialization of pooled Connection in Track...
* See full diff in [compare view](redis/jedis@v7.5.2...v7.5.3)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=redis.clients:jedis&package-manager=maven&previous-version=7.5.2&new-version=7.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants