Skip to content
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

Close iterators #772

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Close iterators #772

merged 1 commit into from
Apr 3, 2019

Conversation

kuba--
Copy link
Contributor

@kuba-- kuba-- commented Apr 2, 2019

Signed-off-by: kuba-- kuba@sourced.tech

We have a cascade of iterators. Some iterators are not closing (what breaks a chain).
In this PR I tried to close all possible iterators. Rest of the stuff has to be done in mysql. For some cases (where we pass iterator to tables or to builders) I have a feeling that we never have a chance to close it because either it's wrapped by many interfaced or there is no right place where we can do it.

At least those simple Close statements can partly fix #765

Signed-off-by: kuba-- <kuba@sourced.tech>
@kuba-- kuba-- requested review from dpordomingo and a team April 2, 2019 22:14
Copy link
Contributor

@dpordomingo dpordomingo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fetched this PR and built to different versions of gitbase: gitbase-master (from master), and gitbase-pr772 (from this PR).
Then I ran the failing query (select count(*) from commits over my 7k repos dataset) some times, against both gitbase versions, and all queries against gitbase-master always failed, and the ones against gitbase-master succeeded.

So I'd say LGTM.

@ajnavarro ajnavarro merged commit c5dfbe8 into src-d:master Apr 3, 2019
@kuba-- kuba-- deleted the fix-765/close-it branch April 4, 2019 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Too many open files error
4 participants