Skip to content

MOD-9222: Fix strict timeout result aggregation#5844

Merged
raz-mon merged 2 commits intomasterfrom
razmon-fix_strict_timeout_result_aggregation
Apr 2, 2025
Merged

MOD-9222: Fix strict timeout result aggregation#5844
raz-mon merged 2 commits intomasterfrom
razmon-fix_strict_timeout_result_aggregation

Conversation

@raz-mon
Copy link
Collaborator

@raz-mon raz-mon commented Mar 30, 2025

This PR fixes the aggregation of results when using strict timeout policy together with the safe-loader (i.e., multi-threading).
Specifically, the decrement of the resultsLimit was done too early, such that the safe-loader saw an already-decremented value, thus fetching one less result than needed.
The decrement was moved to the body of the loop, in case the Next() call succeeded, i.e., RS_RESULT_OK was returned from the pipeline.

A test was already encountering this bug, but was changed to use the non-strict timeout policy, thus hiding the bug. This setting was removed from the test, such that now it will use the strict timeout policy and test this behavior (Cursor + MT).

Copy link
Collaborator

@GuyAv46 GuyAv46 left a comment

Choose a reason for hiding this comment

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

🔥

@raz-mon raz-mon enabled auto-merge April 2, 2025 07:09
@codecov
Copy link

codecov bot commented Apr 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.05%. Comparing base (519b1c7) to head (f1cff10).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5844   +/-   ##
=======================================
  Coverage   87.05%   87.05%           
=======================================
  Files         211      211           
  Lines       37788    37789    +1     
  Branches     1229     1229           
=======================================
+ Hits        32895    32898    +3     
+ Misses       4888     4886    -2     
  Partials        5        5           

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

@raz-mon raz-mon added this pull request to the merge queue Apr 2, 2025
Merged via the queue into master with commit 279182f Apr 2, 2025
10 checks passed
@raz-mon raz-mon deleted the razmon-fix_strict_timeout_result_aggregation branch April 2, 2025 08:39
@redisearch-backport-pull-request
Copy link
Contributor

Backport failed for 2.8, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.8
git worktree add -d .worktree/backport-5844-to-2.8 origin/2.8
cd .worktree/backport-5844-to-2.8
git switch --create backport-5844-to-2.8
git cherry-pick -x 279182f7d768679bc9416a75f822727e94c4cc9f

@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 2.10:

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Apr 2, 2025
Fix strict timeout result aggregation

(cherry picked from commit 279182f)
@redisearch-backport-pull-request
Copy link
Contributor

Successfully created backport PR for 8.0:

redisearch-backport-pull-request bot pushed a commit that referenced this pull request Apr 2, 2025
Fix strict timeout result aggregation

(cherry picked from commit 279182f)
github-merge-queue bot pushed a commit that referenced this pull request Apr 2, 2025
MOD-9222: Fix strict timeout result aggregation (#5844)

Fix strict timeout result aggregation

(cherry picked from commit 279182f)

Co-authored-by: Raz Monsonego <[email protected]>
raz-mon added a commit that referenced this pull request Apr 3, 2025
Fix strict timeout result aggregation
github-merge-queue bot pushed a commit that referenced this pull request Apr 6, 2025
MOD-9222: Fix strict timeout result aggregation (#5844)

Fix strict timeout result aggregation
github-merge-queue bot pushed a commit that referenced this pull request Apr 20, 2025
MOD-9222: Fix strict timeout result aggregation (#5844)

Fix strict timeout result aggregation

(cherry picked from commit 279182f)

Co-authored-by: Raz Monsonego <[email protected]>
Co-authored-by: raz-mon <[email protected]>
JoanFM pushed a commit that referenced this pull request May 27, 2025
Fix strict timeout result aggregation
JoanFM pushed a commit that referenced this pull request May 27, 2025
Fix strict timeout result aggregation
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.

3 participants