Repository navigation
Read only the end of the commits DB to find the last commit to mine from - #7647
Merged
Merged
Conversation
The commit retriever, the classify-patch hook, the landings risk report and the testing policy stats read the whole commits DB (12.6 GB) to find its last commit, which takes about 70 seconds. get_last_commit reads only the last 256 commits, and falls back to reading all commits only when none of them passes the filters. On the current DB it takes 0.03 seconds.
…iltered one The scripts mining new commits started from the last commit passing the default filters, so when the DB ended with commits that are filtered out (backouts, commits without a bug, ignored commits), they were mined and appended to the DB again, as download_commits saves all mined commits. Start after the last commit of the DB, like the HTTP service does.
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.
The commit retriever, the classify-patch hook, the landings risk report and the testing policy stats read the whole commits DB (12.6 GB) just to find the commit to start mining from, which takes about 70 seconds.
repository.get_last_commitreads only the last 256 commits, and reads all of them only when none of those passes the filters. On the current DB, it takes 0.03 seconds instead of 70.6 seconds, and returns the same commit.download_commitssaves all mined commits. They now start after the last commit of the DB, like the HTTP service does (http_service/bugbug_http/boot.py).