Fetch docs in batches#42
Open
rdettai-sk wants to merge 3 commits intosekoiafrom
Open
Conversation
rdettai-sk
commented
May 7, 2026
Comment on lines
+157
to
+162
| // // get all in one shot | ||
| // let tonic_response = grpc_client | ||
| // .fetch_docs(tonic_request) | ||
| // .await | ||
| // .map_err(|tonic_error| parse_grpc_error(&tonic_error))?; | ||
| // Ok(tonic_response.into_inner()) |
Collaborator
Author
There was a problem hiding this comment.
Re-enable this before merging to allow smooth searcher roll (first create the streaming grpc endpoint, then use it)
There was a problem hiding this comment.
Pull request overview
Adds a server-streaming gRPC endpoint for FetchDocs and switches the Rust search client to consume document hits in batches, aiming to avoid gRPC message size limits when fetching many/large documents.
Changes:
- Add
StreamFetchDocsRPC to theSearchServiceprotobuf API and regenerate Rust stubs. - Implement
stream_fetch_docsin the gRPC server adapter by chunkingFetchDocsResponse.hitsinto multiple streamed responses. - Update
quickwit-searchgRPC clientfetch_docsto callstream_fetch_docsand fold streamed batches into a singleFetchDocsResponse.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| quickwit/quickwit-serve/src/search_api/grpc_adapter.rs | Implements server-side StreamFetchDocs streaming/batching in the gRPC adapter. |
| quickwit/quickwit-search/src/client.rs | Switches client fetch_docs to use the new streaming RPC and re-assemble hits. |
| quickwit/quickwit-proto/protos/quickwit/search.proto | Adds StreamFetchDocs RPC definition and related comments. |
| quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs | Regenerated gRPC client/server stubs for the new streaming method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
284024a to
d6b1868
Compare
Darkheir
approved these changes
May 8, 2026
b92b812 to
6aea4de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Add a new GRPC endpoint that streams hits in batches instead of returning them all at once. It isn't used for now because we want to first deploy the searchers with the endpoint to enable a clean rollout.
Attempt to replace #41 as it got off the wrong foot.
How was this PR tested?
I ran the test suite with the batched endpoint and it worked fine.