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

universal-query: Sketch request types pipeline #4198

Merged
merged 2 commits into from May 13, 2024
Merged

Conversation

coszio
Copy link
Contributor

@coszio coszio commented May 7, 2024

Main idea: Each user request will be converted into a new type at each step of the search: API -> ToC -> Collection -> Shards.

This PR adds the types used at Shards level only, as well as a PoC of how the request will be handled at LocalShard.

Note that a significant amount of changed lines come from moving the LocalShard implementations of do_search scroll and query to their own files

All Submissions:

  • Contributions should target the dev branch. Did you create your branch from dev?
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --all --all-features command?

Comment on lines +5 to +11
//! Pipeline of type conversion:
//!
//! 1. `rest::QueryRequest`, `grpc::QueryPoints`: rest or grpc request. Used in API
//! 2. `CollectionQueryRequest`: Direct representation of the API request, but to be used as a single type. Created at API to enter ToC.
//! 3. `ShardQueryRequest`: same as the common request, but all point ids have been substituted with vectors. Created at Collection
//! 4. `QueryShardPoints`: to be used in the internal service. Created for RemoteShard, converts to and from ShardQueryRequest
//! 5. `PlannedQuery`: an easier-to-execute representation. Created in LocalShard
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the proposed type pipeline description

@coszio coszio force-pushed the universal-query-at-shards branch from 8509242 to 48df0f8 Compare May 13, 2024 12:36
uint64 limit = 5;
}

Prefetch prefetch = 1;
Copy link
Member

Choose a reason for hiding this comment

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

repeated?

}

message Prefetch {
Prefetch prefetch = 1;
Copy link
Member

Choose a reason for hiding this comment

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

repeated?

Copy link
Member

@agourlay agourlay left a comment

Choose a reason for hiding this comment

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

I think it makes to merge this PR sooner than later.

This is a sketch of the types required to get us started, perfection is not expected.

This PR exists because we want to avoid a huge changing set at once.

With it we can start a more bottom approach.

@coszio coszio merged commit 88bb625 into dev May 13, 2024
17 checks passed
@coszio coszio deleted the universal-query-at-shards branch May 13, 2024 16:04
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.

None yet

2 participants