[MOD-11398] Add "ignore" option to ON_OOM config#6828
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6828 +/- ##
==========================================
- Coverage 87.20% 86.98% -0.23%
==========================================
Files 288 288
Lines 46050 46174 +124
Branches 8954 9072 +118
==========================================
+ Hits 40159 40163 +4
- Misses 5740 5860 +120
Partials 151 151
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| OomPolicy_Return, // Return what we have on OOM | ||
| OomPolicy_Fail, // Just fail without returning anything | ||
| OomPolicy_Ignore, // Ignore OOM and continue | ||
| OomPolicy_Invalid // Not a real value |
There was a problem hiding this comment.
Why do we need the Invalid value? (regarding both enums)
There was a problem hiding this comment.
In timeout, it is used in SET ON_TIMEOUT calling TimeoutPolicy_Parse, if a user gave a wrong string as option it returns TimeoutPolicy_Invalid.
I followed suit.
You think it's better if we remove it and use a different return value for parse?
There was a problem hiding this comment.
No, up to you. I think it's OK, especially if it's aligned with past configs. I don't think it adds anything, and we don't store invalid configs, so it should be unreachable
(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.
Add ignore as option to ON_OOM config.
Because on_oom and on_timeout do not share policy options, the changes from #6769 are reverted and the policy enums are seperated.
Because of the revert, I suggest, for an easier review, to review by commit and not the PR as is, the revert commit was done automaticly.