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

OOME when there are large amounts of validation reports #42

Open
RickMoynihan opened this issue Feb 25, 2021 · 0 comments
Open

OOME when there are large amounts of validation reports #42

RickMoynihan opened this issue Feb 25, 2021 · 0 comments

Comments

@RickMoynihan
Copy link
Member

RickMoynihan commented Feb 25, 2021

e.g. running

$ clojure -M:pmd-qb:validate -e https://staging.gss-data.org.uk/sparql

In the pmd-rdf-validations repo.

I think one reason this may occur is because of this:

(defn run-test-cases [test-cases query-variables endpoint]
(map #(run-test-case % query-variables endpoint) test-cases))

I suspect Clojure's batching of lazy seqs into 32 items might cause a space leak here if a test-case returns a large lazy sequence of test case errors then it may not be released. Out of curiousity I tried hacking this by putting a (take 1000) over the results inside the with-open which eagerly loads data into a vector, however it seemed the leak was still occuring, so I suspect there may be other issues here.

It may be worth rewriting this code to be eager using transducers, or to put a configurable limit over the amount of test failures to report on for any given test case.

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

No branches or pull requests

1 participant