MOD-9054: Fix total_results field in shard RESP3 response#5765
MOD-9054: Fix total_results field in shard RESP3 response#5765
total_results field in shard RESP3 response#5765Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR addresses MOD-9054 by fixing the total_results field in the RESP3 response and removing a redundant check. The key changes include:
- Removal of an unnecessary check from the shard RESP3 response.
- Introduction of a new test to ensure that the
total_resultsfield in theFT.AGGREGATEcommand is accurate.
There was a problem hiding this comment.
Pull Request Overview
This PR addresses MOD-9054 by fixing the total_results field in the shard RESP3 response and removing a redundant check in RESP2/RESP3 response paths to ensure accurate result counts.
- Introduces a new test (test_totalResults_aggregate) that verifies the correct total_results when using the RESP3 protocol
- Updates the test suite in tests/pytests/test_resp3.py to cover the fixed behavior
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5765 +/- ##
=======================================
Coverage 88.11% 88.11%
=======================================
Files 200 200
Lines 36067 36063 -4
=======================================
- Hits 31779 31777 -2
+ Misses 4288 4286 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.8
git worktree add -d .worktree/backport-5765-to-2.8 origin/2.8
cd .worktree/backport-5765-to-2.8
git switch --create backport-5765-to-2.8
git cherry-pick -x 19504b6e4211d7722e6e6a08a7d85a54fe751323 |
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-5765-to-2.10 origin/2.10
cd .worktree/backport-5765-to-2.10
git switch --create backport-5765-to-2.10
git cherry-pick -x 19504b6e4211d7722e6e6a08a7d85a54fe751323 |
|
Successfully created backport PR for |
* Remove redundant condition * Return correct number of results in FT.AGGREGATE + RESP3 * Remove redundant condition in RESP2 response path * Add test * Add cursor test * Fix spelling error * Fix test (cherry picked from commit 19504b6)
* Remove redundant condition * Return correct number of results in FT.AGGREGATE + RESP3 * Remove redundant condition in RESP2 response path * Add test * Add cursor test * Fix spelling error * Fix test
* Remove redundant condition * Return correct number of results in FT.AGGREGATE + RESP3 * Remove redundant condition in RESP2 response path * Add test * Add cursor test * Fix spelling error * Fix test
) MOD-9054: Fix `total_results` field in shard RESP3 response (#5765) * Remove redundant condition * Return correct number of results in FT.AGGREGATE + RESP3 * Remove redundant condition in RESP2 response path * Add test * Add cursor test * Fix spelling error * Fix test
Changes introduced in this PR:
total_resultsfield in the RESP3 response to be CORRECT, always.Note: This fix should not be breaking, since it changes the response order of the MAP we use in RESP3, in which the order plays no role.
For that reason exactly (breakage), we do not fix this for RESP2.