borges: check if siva file is empty when it shouldn't#366
Merged
jfontan merged 2 commits intosrc-d:masterfrom Nov 13, 2018
Merged
borges: check if siva file is empty when it shouldn't#366jfontan merged 2 commits intosrc-d:masterfrom
jfontan merged 2 commits intosrc-d:masterfrom
Conversation
If there are mentions to the init commit in any reference it checks that the siva is not empty (contains at least one commit). To do this two new functions are added to RepositoryStore interface: * GetRefsByInit: Gets all references that have the provided init commit. Still not used but will be needed soon to fix problems with missing or broken siva files. * InitHasRefs: Returns true if there's a reference with an specific init commit. Similar to GetRefsByInit but faster because it only check that at least one reference has it and does not retrieve repository data. Note: we need an index in Reference.Init Signed-off-by: Javi Fontan <jfontan@gmail.com>
Contributor
|
@jfontan check the CI, codecov is not executed. |
Signed-off-by: Javi Fontan <jfontan@gmail.com>
Contributor
Author
|
@ajnavarro now coverage is sent. It was disabled after updating to ci v1. Previously this was done by |
Contributor
|
Just to do not forget. If we need an index, we should add it here: https://github.com/src-d/core-retrieval/blob/master/schema/sql/schema.sql |
ajnavarro
approved these changes
Nov 8, 2018
Contributor
Author
|
I've just checked and there's already an index in CREATE INDEX IF NOT EXISTS idx_references_init ON "repository_references" ("init"); |
mcarmonaa
approved these changes
Nov 13, 2018
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.
If there are mentions to the init commit in any reference it checks that
the siva is not empty (contains at least one commit).
To do this two new functions are added to
RepositoryStoreinterface:GetRefsByInit: Gets all references that have the provided init commit.Still not used but will be needed soon to fix problems with missing or
broken siva files.
InitHasRefs: Returns true if there's a reference with an specific initcommit. Similar to
GetRefsByInitbut faster because it only check thatat least one reference has it and does not retrieve repository data.
Note: we need an index in
Reference.InitFixes: #365