src-d / gitbase

SQL interface to git repositories, written in Go. https://docs.sourced.tech/gitbase
Apache License 2.0
2.06k stars 124 forks source link

Blame: error kills connection and stop query. #966

Closed ajnavarro closed 4 years ago

ajnavarro commented 4 years ago

Executing the following query:

select commit_hash,explode(blame(repository_id, commit_hash)) from commits limit 100000

I got this error:

INFO[0003] audit trail                                   action=authentication address="127.0.0.1:60820" success=true system=audit user=root
DEBU[0003] executing query                               query="select commit_hash,explode(blame(repository_id, commit_hash)) from commits limit 100000"
INFO[0003] audit trail                                   action=authorization address="127.0.0.1:60820" connection_id=1 permission=read pid=1 query="select commit_hash,explode(blame(repository_id, commit_hash)) from commits limit 100000" success=true system=audit user=root
INFO[0007] audit trail                                   action=query address="127.0.0.1:60820" connection_id=1 duration=3.690559548s err="contents and commits have different length" pid=1 query="select commit_hash,explode(blame(repository_id, commit_hash)) from commits limit 100000" success=false system=audit user=root
ERRO[0007] Error in the middle of a stream to client 1 (127.0.0.1:60820): contents and commits have different length 
INFO[0007] kill query: pid 1                            
INFO[0007] ConnectionClosed: client 1              

This error shouldn't stop te query, just add a Warning to check later on SHOW WARNINGS.