Skip to content

Update to oom flags on search commands and fix error propagation in coordinator / iscancelled cases#901

Merged
KarthikSubbarao merged 16 commits intovalkey-io:mainfrom
KarthikSubbarao:oom
Mar 12, 2026
Merged

Update to oom flags on search commands and fix error propagation in coordinator / iscancelled cases#901
KarthikSubbarao merged 16 commits intovalkey-io:mainfrom
KarthikSubbarao:oom

Conversation

@KarthikSubbarao
Copy link
Copy Markdown
Member

The PR does the following:

Update to oom flags on search commands. We are marking search commands with the denyoom flags following what was done since 1.0.
Updated Error Tracking / Propagation to ensure we do not always return the "timeout" message even we cancel a fanout operation.
Updated the normal code path of search commands (commands.cc) to first attempt replying with an error message based on the status. If no error, then check if canceled and return the standard timeout error.
Note: The logic for early cancellation when partial results are disabled is still retained in this PR. If there is a timeout when partial results are disabled, we cancel without waiting and return the timed out error message.

The parts which are new are the following:
We have added handling for the case (with partial results disabled) and one of the fanouts fails with OOM. We now have correct with error propagation for it
It also adds handling for the case (with partial results enabled) where we have not timed out, and all nodes have failed. Since it tracks the first error message, we are able to reply with the error now

…ext-rax-target-mutex-pool-size to Dev configs

Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
…#685)"

This reverts commit cd722c4.

Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
@KarthikSubbarao
Copy link
Copy Markdown
Member Author

The PR here was merged incorrectly (using Merge a Commit), so I have this PR now as a redo

@KarthikSubbarao KarthikSubbarao merged commit 2cf5844 into valkey-io:main Mar 12, 2026
17 checks passed
rileydes-improving pushed a commit to Bit-Quill/valkey-search that referenced this pull request Mar 16, 2026
…oordinator / iscancelled cases (valkey-io#901)

The PR does the following:

Update to oom flags on search commands. We are marking search commands
with the denyoom flags following what was done since 1.0.
Updated Error Tracking / Propagation to ensure we do not always return
the "timeout" message even we cancel a fanout operation.
Updated the normal code path of search commands (commands.cc) to first
attempt replying with an error message based on the status. If no error,
then check if canceled and return the standard timeout error.
Note: The logic for early cancellation when partial results are disabled
is still retained in this PR. If there is a timeout when partial results
are disabled, we cancel without waiting and return the timed out error
message.

The parts which are new are the following:
We have added handling for the case (with partial results disabled) and
one of the fanouts fails with OOM. We now have correct with error
propagation for it
It also adds handling for the case (with partial results enabled) where
we have not timed out, and all nodes have failed. Since it tracks the
first error message, we are able to reply with the error now

---------

Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
rileydes-improving pushed a commit to Bit-Quill/valkey-search that referenced this pull request Mar 16, 2026
…oordinator / iscancelled cases (valkey-io#901)

The PR does the following:

Update to oom flags on search commands. We are marking search commands
with the denyoom flags following what was done since 1.0.
Updated Error Tracking / Propagation to ensure we do not always return
the "timeout" message even we cancel a fanout operation.
Updated the normal code path of search commands (commands.cc) to first
attempt replying with an error message based on the status. If no error,
then check if canceled and return the standard timeout error.
Note: The logic for early cancellation when partial results are disabled
is still retained in this PR. If there is a timeout when partial results
are disabled, we cancel without waiting and return the timed out error
message.

The parts which are new are the following:
We have added handling for the case (with partial results disabled) and
one of the fanouts fails with OOM. We now have correct with error
propagation for it
It also adds handling for the case (with partial results enabled) where
we have not timed out, and all nodes have failed. Since it tracks the
first error message, we are able to reply with the error now

---------

Signed-off-by: KarthikSubbarao <karthikrs2021@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants