Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicitly bump priority of searchvisitor instances #33386

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

vekterli
Copy link
Member

@geirst please review.

When the Document API protocol serialization was rewritten to use Protobuf, the legacy client operation priorities were intentionally omitted and instead all default to the same value (interleaving external ops with internal maintenance ops). This is because operation priorities for mutations cause a lot of headaches in the backend due to potential reordering in the persistence queues across nodes, and also risk starving critical internal operations.

However, this introduced a subtle regression where certain read-only operations that should have a high priority no longer had them, in particular streaming search. Since so many operations are async internally on the content node, in practice this would only be noticeable as a problem if a node was completely swamped and all persistence threads were otherwise stalled.

As a pragmatic solution, this commit adds an implicit priority bump of visitors of type searchvisitor, which is the visitor instance type used by streaming search.

When the Document API protocol serialization was rewritten to
use Protobuf, the legacy client operation priorities were
intentionally omitted and instead all default to the same value.
This is because operation priorities for mutations cause a
lot of headaches on the backend nodes due to potential reordering
in the persistence queues.

However, this introduced a subtle regression where certain
read-only operations that _should_ have a high priority no longer
had them, in particular streaming search.

As a pragmatic solution, this commit adds an implicit priority
bump of visitors of type `searchvisitor`, which is the visitor
instance type used by streaming search.
@vekterli vekterli requested a review from geirst February 21, 2025 12:16
@vekterli vekterli merged commit 62c4272 into master Feb 21, 2025
3 checks passed
@vekterli vekterli deleted the vekterli/bump-searchvisitor-priority branch February 21, 2025 13:35
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