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

shanoir-issue#2560: stats export fails on big request #2572

Merged
merged 45 commits into from
Jan 28, 2025

Conversation

pierrehenri-dauvergne
Copy link
Collaborator

@pierrehenri-dauvergne pierrehenri-dauvergne commented Jan 9, 2025

With this parameters:

Study to include : Cohorte Principale.*|CISCO.*|Cohorte VHD.*
Subject to exclude : ^TestDummyRun.*|^test.*

The statistics export gives an empty file (doesn't even contain the headers).

With others parameters such as:

Study to include : Cohorte Principale - CHU Fort-de-France

It is working well

This PR is used to deploy and test on ofsep-qualif

This error is thrown:
o.h.e.jdbc.spi.SqlExceptionHelper - Java heap space

I think it happens in DatasetRepositoryImpl.queryStatistics method, on this line:
List<Object[]> results = query.getResultList();
Filling the List with 1+ millions line is filling the java heap space. A possible solution could be to increase the java heap space at application startup with something like this: java -Xmx1024m -Xms512m -jar app.jar but that wouldn't solve the issue for other bigger requests.

pierrehenri-dauvergne and others added 27 commits January 10, 2025 15:36
@michaelkain
Copy link
Contributor

Hi @pierrehenri-dauvergne, please use only one sql file for both procedures, if possible. I have fear the next developer will adapt the getStatistics and forget to adapt getStatisticsSize at the same time. If all in one file, this should be to avoid. Cheers, Michael

@pierrehenri-dauvergne pierrehenri-dauvergne added REVIEWABLE Has to be reviewed and removed WorkInProgress labels Jan 23, 2025
Copy link
Contributor

@michaelkain michaelkain left a comment

Choose a reason for hiding this comment

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

very close to finish

@michaelkain
Copy link
Contributor

michaelkain commented Jan 24, 2025

One more thing: please adapt only the 3_add_statistics_procedure.sql, that concerns the ofsep-stats. The 4_add_studyStatistics_procedure.sql does not have to be impacted by your PR. So 3_add_statistics_procedure should contain getStatistics and getStatisticsSize. Thanks!

@pierrehenri-dauvergne pierrehenri-dauvergne added WorkInProgress and removed REVIEWABLE Has to be reviewed labels Jan 24, 2025
@michaelkain
Copy link
Contributor

thank you! one minor item remains then we are ready, always better to use instead of an explicit close the try-with-resources, thx!

@michaelkain
Copy link
Contributor

Perfect for the code now. I approve.

@michaelkain
Copy link
Contributor

Hi @pierrehenri-dauvergne, can you please confirm, that it still runs on qualif? Thanks, if yes, I merge. Cheers, Michael

@michaelkain michaelkain merged commit aee6865 into fli-iam:develop Jan 28, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export of stats don't work when too big results
2 participants