Implicitly bump priority of searchvisitor
instances
#33386
Merged
+24
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@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.