Repository navigation
[8.8-rse] MOD-17092 FT.HYBRID: forward PARAMS/TIMEOUT from parsed state, not argv re-scan - #10928
Merged
Merged
Conversation
…gv re-scan (#10566) * FT.HYBRID: forward PARAMS/TIMEOUT from parsed state, not argv re-scan * Revert initQueryTimeout() changes * Add HYBRID_NUM_BUF_SIZE constant, address SonarQube comments int test_cpp_hybrid_build_mr_cmd.cpp * Refactor HybridRequest_buildMRCommand to use HybridShardWireParams * Assert HybridCombineWireParams is not NULL in MRCommand_appendCombine (cherry picked from commit e049d94) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 8.8-rse #10928 +/- ##
==========================================
Coverage ? 81.14%
==========================================
Files ? 561
Lines ? 75623
Branches ? 30506
==========================================
Hits ? 61366
Misses ? 13971
Partials ? 286
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Itzikvaknin
approved these changes
Aug 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Backport of #10566 to
8.8-rse.Original PR
e049d9452b58204152b2c4808db006b663814f46Cherry-pick result
Resolved 7 conflict(s) across 3 files — see Conflict Log below.
8.8-rseis missing one master-only change that this PR builds on top of, whichis the root cause of every C conflict:
8.8-rseMR_NewCommandArgvLen,cmdLens[],MRCommand_AppendLiteral)MR_NewCommandArgv/strlen-based command assembly; dropped one master-only testsrc/coord/hybrid/dist_hybrid.h,src/hybrid/parse_hybrid.candsrc/hybrid/parse_hybrid.happlied cleanly, so theHybridShardWireParamsrefactor (including
sendExplainScore), theint *outKArgIndexsignature andthe parsed-state capture in front of the foreground query-timeout cap are all
backported verbatim.
The functional core of the PR — reconstructing
PARAMSfrom the resolvedparameter dictionary and forwarding
TIMEOUTfrom parsed state instead ofre-scanning
argv— is backported in full.Verified:
./build.sh TESTSexit 0;RUN_UNIT_TESTS944/944 (141/141 coordinatorC++);
test_hybrid_yield.py19/19 standalone and 19/19 cluster; 95/95 acrosstest_hybrid,_timeout,_dialect,_explainscore,_profile,_dist,_shard_k_ratioand_internalin cluster mode.Conflict Log
The conflicts span
dist_hybrid.c,test_cpp_hybrid_build_mr_cmd.cppandtest_hybrid_yield.py. Most resolved mechanically — keep the target's command assembly,take everything else from the PR. Two were incidental:
param.hwas added to the target'sexisting include list rather than master's reorganised one, and the
_FT.PROFILEblockfollows the same assembly decision as the prologue. The decisions worth recording:
Length-aware command assembly dropped —
dist_hybrid.c. The incoming prologue and_FT.PROFILEblock carry asize_t cmdLens[5]recorded alongsidecmdArgs[]and captureindex_name_len. Kept the target'scmdArgs[cmdArgCount++]assembly and itsRedisModule_StringPtrLen(argv[1], NULL)call. The emitted wire tokens are identical;only the length bookkeeping, which
MR_NewCommandArgvderives viastrlen, is absent.EXPLAINSCOREstill forwarded, throughMRCommand_Append—dist_hybrid.c:389. Theincoming side calls
MRCommand_AppendLiteral, which does not exist on this branch, so theappend was rewritten as
MRCommand_Append(xcmd, "EXPLAINSCORE", strlen("EXPLAINSCORE")).Unlike the
8.6/8.6-rsebackports,sendExplainScorestays inHybridShardWireParamsand
testExplainScoreNotForwardedFromArgvTextis retained — this branch does forwardQEXEC_F_SEND_SCOREEXPLAINto shards.The PR's new
lens[oi]assertion was taken —test_cpp_hybrid_build_mr_cmd.cpp:255.The PR replaces the verifier's unconditional tail with PARAMS-aware branching that adds
EXPECT_EQ(xcmd->lens[oi], strlen(inputArgs[ii])); the target's shorter tail had no suchassertion, so the deletion did not match and the old block was left behind. Kept the PR's
branching block and removed the leftover tail. The assertion holds without the length-aware
assembly because
MR_NewCommandArgvpopulateslensthroughassignCstr→strlenandevery oracle input is a NUL-terminated C string. Confirmed passing.
testBinaryArgsForwardedAtFullLengthdropped — the PR only updates this test's callsite to the new signature, but the test itself is master-only and unportable here: it
asserts a full byte length for an index name containing an embedded NUL, which
MR_NewCommandArgvtruncates atstrlen. Every other test the PR touches or adds isretained, including the PARAMS/TIMEOUT and keyword-collision cases and the new
...WithParams/...WithIndexSpecAndParamsfixture helpers.Pytest query vector —
test_hybrid_yield.py:253. Both sides fix the same tie-breakingflakiness in
test_hybrid_combine_yield_score_as_both_forms; kept the target's[0.0, 0.25]and its explanatory comment over the PR's[1.2, 0.3]. The PR's newtest_hybrid_yield_score_as_keyword_aliasmerged cleanly.Release notes
🤖 Generated with Claude Code