-
Notifications
You must be signed in to change notification settings - Fork 125
Check how is interfering git on a git repository that we are reading #634
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
Comments
Case 1Query: SELECT files.repository_id, files.file_path
FROM files
NATURAL JOIN refs
NATURAL JOIN commits
WHERE SUBSTRING(ref_name,1,15) = 'refs/heads/HEAD' Git: $ git checkout dev.debug
$ git gc Error:
Case 2 (not related to interop git-gitbase)Query: SELECT
file_path
FROM (
SELECT
file_path,
uast_extract(
uast(
blob_content,
LANGUAGE(
file_path,
blob_content
),
"//FuncLit"
),
"internalRole"
) AS uast
FROM files
WHERE LANGUAGE(file_path, blob_content) = 'Go'
) AS q1
LIMIT 1000; Git: $ git checkout -b kuba
$ cp final-noclosure.go kuba.go # add a new .go file
$ git add .
$ git commit -a Error:
At some point bblfshd threw an exception:
Case 3Git: # revert changes (kuba.go file as a copy of final-noclosure.go)
$ git revert 771c2dcfd4a7daea53056af419fb83d7a52fa638
$ git commit -a
$ git gc --auto
$ git checkout master
$ git branch -D kuba
$ git reset --hard Query: SELECT
file_path, blob_hash, SUBSTRING(`file_path`, 19, 10) AS NAME
FROM (
SELECT
blob_hash,
file_path,
uast_extract(
uast(
blob_content,
LANGUAGE(
file_path,
blob_content
),
"//FuncLit"
),
"internalRole"
) AS uast
FROM files
WHERE LANGUAGE(file_path, blob_content) = 'Go'
) AS q1
LIMIT 10; I still saw Case 4Generally
Case 5Created a new SELECT
file_path, blob_hash, SUBSTRING(`file_path`, 19, 10) AS fname
FROM (
SELECT
blob_hash,
file_path,
uast_extract(
uast(
blob_content,
LANGUAGE(
file_path,
blob_content
),
"//FuncLit"
),
"internalRole"
) AS uast
FROM files
WHERE LANGUAGE(file_path, blob_content) = 'Go'
) AS q1
WHERE fname='kuba.go'
LIMIT 1; Git: $ rm kuba.go
$ git add .
$ git commit -a Ran the query again and it cannot find a file (but after Btw. if we parse 100+ files bblfshd starts being unresponsive and times out. Case 6Query: CREATE INDEX email_idx ON commits USING pilosa (commit_author_email); Git: $ git gc Query: SELECT * FROM commits WHERE commit_author_email!='....' LIMIT 100; Error: Case 7Because we assume that gitbase is readonly we don't invalidate our cache (I assume). SELECT * FROM commits WHERE commit_author_name='kuba--'
SELECT count(*) FROM commits; Still show my commits. I assumed that query: |
@ajnavarro - PTAL |
Some annotations:
|
The main problem that I can see here is that gitbase or go-git is saving some references to outdated packfiles, and if some new objects or package are created, we are not able to read it neither. Also, go-git is not using git locks at all. |
Can we still read the content of a repository when git is making changes? Is go-git prepared for that? Is go-git using the git locks?
The text was updated successfully, but these errors were encountered: