Skip to content

Fetch docs in batches#42

Open
rdettai-sk wants to merge 3 commits intosekoiafrom
fix/batch-fetch-values
Open

Fetch docs in batches#42
rdettai-sk wants to merge 3 commits intosekoiafrom
fix/batch-fetch-values

Conversation

@rdettai-sk
Copy link
Copy Markdown
Collaborator

@rdettai-sk rdettai-sk commented May 7, 2026

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.

Copilot AI review requested due to automatic review settings May 7, 2026 21:00
Comment thread quickwit/quickwit-search/src/client.rs Outdated
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())
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-enable this before merging to allow smooth searcher roll (first create the streaming grpc endpoint, then use it)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 StreamFetchDocs RPC to the SearchService protobuf API and regenerate Rust stubs.
  • Implement stream_fetch_docs in the gRPC server adapter by chunking FetchDocsResponse.hits into multiple streamed responses.
  • Update quickwit-search gRPC client fetch_docs to call stream_fetch_docs and fold streamed batches into a single FetchDocsResponse.

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.

Comment thread quickwit/quickwit-serve/src/search_api/grpc_adapter.rs
Comment thread quickwit/quickwit-serve/src/search_api/grpc_adapter.rs
Comment thread quickwit/quickwit-serve/src/search_api/grpc_adapter.rs Outdated
Comment thread quickwit/quickwit-search/src/client.rs Outdated
Comment thread quickwit/quickwit-search/src/client.rs Outdated
Comment thread quickwit/quickwit-proto/protos/quickwit/search.proto Outdated
Comment thread quickwit/quickwit-proto/src/codegen/quickwit/quickwit.search.rs
@rdettai-sk rdettai-sk force-pushed the fix/batch-fetch-values branch from 284024a to d6b1868 Compare May 8, 2026 11:41
@rdettai-sk rdettai-sk requested review from Darkheir May 8, 2026 11:56
@rdettai-sk rdettai-sk force-pushed the fix/batch-fetch-values branch from b92b812 to 6aea4de Compare May 8, 2026 12:01
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.

3 participants