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

fix affiliation chunking and git plugin performance #634

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

j-lanson
Copy link
Collaborator

Resolves #603 .

As I mentioned in the issue comment, the cause of @alilleybrinker's issue related to gRPC message side stems from large outbound requests from the affiliation plugin to the git plugin when analyzing large repositories like torvalds/linux. The Hipcheck gRPC protocol does not support request chunking at present, only response chunking. Updated affiliation plugin to do some chunking of outbound requests of its own, until the time this issue is resolved

Once I fixed that, I found that affiliation's requests to git were taking an extremely and unacceptably long time to execute, and found our way of getting contributor-commit information was extremely inefficient and could be improved by using RawCommits instead of Commit.

@j-lanson j-lanson added type: bug Something isn't working product: hc Relates to the core "hc" binary product: rust-sdk Relates to the Rust plugin SDK labels Nov 15, 2024
@j-lanson j-lanson added this to the 3.8.0 milestone Nov 15, 2024
@j-lanson j-lanson self-assigned this Nov 15, 2024
For really large repos, affiliation might send a request to the git
plugin containing all commits such that the request is larger than the
gRPC maximum. The Hipcheck gRPC protocol currently does not allow for
chunked queries, so the affiliation plugin has been modified to do its
own chunking internally.
Although the git plugin's `RawCommit` struct contains author and
committer information, the `Commit` struct does not. For looking up the
contributors to a commit we were doing a lot of expensive and wasteful
computation to re-engineer what is already available in `RawCommit`.
This commit exposes more functionality to the query endpoint functions
to get `RawCommit` collections so we spend less time looking for
information that was already there before we discarded it.
@mchernicoff mchernicoff merged commit a562c90 into main Nov 18, 2024
9 checks passed
@alilleybrinker alilleybrinker deleted the jlanson/fix-chunking branch November 22, 2024 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product: hc Relates to the core "hc" binary product: rust-sdk Relates to the Rust plugin SDK type: bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

failures when analyzing torvalds/linux
2 participants