Skip to content

[MOD-11161] Add ON_OOM config#6769

Merged
lerman25 merged 4 commits intomasterfrom
omerl-add-on-oom-config
Sep 4, 2025
Merged

[MOD-11161] Add ON_OOM config#6769
lerman25 merged 4 commits intomasterfrom
omerl-add-on-oom-config

Conversation

@lerman25
Copy link
Collaborator

@lerman25 lerman25 commented Sep 3, 2025

This PR introduces a new search config, ON_OOM.
It's identical to ON_TIMEOUT config, but controls the behavior when query has reached OOM stats.

@github-actions github-actions bot added the size:M label Sep 3, 2025
src/config.h Outdated
static const int on_timeout_enums[2] = {
TimeoutPolicy_Return,
TimeoutPolicy_Fail
FailurePolicy_Return, // Return what we have on timeout
Copy link
Collaborator

@JoanFM JoanFM Sep 3, 2025

Choose a reason for hiding this comment

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

Suggested change
FailurePolicy_Return, // Return what we have on timeout
FailurePolicy_Return, // Return what we have on failure (timeout or OOM)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch

@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 97.91667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.20%. Comparing base (350a661) to head (d7a7596).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
src/aggregate/aggregate_exec.c 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6769      +/-   ##
==========================================
- Coverage   87.23%   87.20%   -0.04%     
==========================================
  Files         287      287              
  Lines       45241    45265      +24     
  Branches     8239     8238       -1     
==========================================
+ Hits        39466    39473       +7     
- Misses       5650     5667      +17     
  Partials      125      125              
Flag Coverage Δ
flow 84.67% <97.91%> (-0.16%) ⬇️
unit 49.25% <10.41%> (-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.

Copy link
Collaborator

@JoanFM JoanFM left a comment

Choose a reason for hiding this comment

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

small suggestion

@lerman25 lerman25 added this pull request to the merge queue Sep 4, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 4, 2025
* Change variables name from Timeout (specific) to Failure (general)

* Add ON_OOM configuration option and related functionality

* Change comment is FailurePolicy

* Add coverage
@lerman25 lerman25 removed this pull request from the merge queue due to a manual request Sep 4, 2025
@lerman25 lerman25 added this pull request to the merge queue Sep 4, 2025
@lerman25 lerman25 removed this pull request from the merge queue due to a manual request Sep 4, 2025
@lerman25 lerman25 added this pull request to the merge queue Sep 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 4, 2025
@lerman25 lerman25 added this pull request to the merge queue Sep 4, 2025
Merged via the queue into master with commit 345beec Sep 4, 2025
17 checks passed
@lerman25 lerman25 deleted the omerl-add-on-oom-config branch September 4, 2025 17:26
lerman25 added a commit that referenced this pull request Sep 15, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 17, 2025
* Revert "[MOD-11161] Add ON_OOM config (#6769)"
This reverts commit 345beec.

* Re-Add ON_OOM config - with ignore

* cover enums

* Refactor timeout and OOM policy string conversion to use assertions for validity
lerman25 added a commit that referenced this pull request Sep 24, 2025
* Revert "[MOD-11161] Add ON_OOM config (#6769)"
This reverts commit 345beec.

* Re-Add ON_OOM config - with ignore

* cover enums

* Refactor timeout and OOM policy string conversion to use assertions for validity
YaacovHazan pushed a commit to redis/redis that referenced this pull request Oct 27, 2025
(RediSearch/RediSearch#7076,
RediSearch/RediSearch#6857) - Introducing
`FT.HYBRID`, a new command that enables hybrid queries combining both
text and vector search, with support for **RRF** and **LINEAR** result
combination. This update enhances performance and reliability through a
more efficient networking layer, smoother query execution, and improved
overall stability.
(RediSearch/RediSearch#7065) - Add
`search-default-scorer` configuration to set the default text scorer
across queries (by default it is BM25).
RediSearch/RediSearch#7022 - Handle Atomic Slot
Migration events upon moving slots from one node to another in a cluster
mode.
(RediSearch/RediSearch#6769,
RediSearch/RediSearch#6828,
RediSearch/RediSearch#6877,
RediSearch/RediSearch#6921) - Introduce query
time memory guardrails by adding a new `search-on-oom` configuration
which defines the query engine behavior when OOM (Out Of Memory) is
reached. OOM checks are applied to `FT.SEARCH`, `FT.AGGREGATE`, and
`FT.HYBRID` commands. The behavior on OOM can be configured to one of
three modes: `IGNORE`, `FAIL`, or `RETURN`.
`IGNORE` - The default behavior, run queries anyway (not recommended for
heavy queries returning a large result set).
`FAIL` - Fail query execution immediately if any of the nodes are in OOM
state when query execution starts.
`RETURN` - A best effort appraoch to return partial results when OOM is
detected in only some of the nodes in a cluster mode.
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.

3 participants