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

ERROR 1105 (HY000): unknown error: no memory available #969

Closed ajnavarro closed 4 years ago

ajnavarro commented 4 years ago

Setting MAX_MEMORY to 1024 and executing the following query:

SELECT 
    COUNT(blob_hash),        
    commit_hash 
FROM ref_commits 
NATURAL JOIN commits 
NATURAL JOIN commit_blobs 
WHERE ref_name = 'HEAD' 
GROUP BY commit_hash;

I get the following error:

ERROR 1105 (HY000): unknown error: no memory available

This is OK, but if I execute the query again, it can be executed as usual.

If it can be executed, it should be executed the first time too.

It took 36362 rows in set (11 min 27.23 sec)

erizocosmico commented 4 years ago

What is the dataset?

ajnavarro commented 4 years ago

sorry, I forgot to mention it: bblfsh + src-d organizations.

erizocosmico commented 4 years ago

I've downloaded the dataset and tried to reproduce with 1024 and other different amounts and whenever it errors the first time, it errors all other times for me.

Did you try with the siva files collected by gitcollector or manually download? Perhaps if they were not siva, the memory footprint will change.

ajnavarro commented 4 years ago

They are siva files downloaded using gitcollector.

erizocosmico commented 4 years ago

I used those too and could not reproduce

ajnavarro commented 4 years ago

I'm not able to reproduce it again, closing the issue.