-
Notifications
You must be signed in to change notification settings - Fork 22
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
shanoir-issue#2560: stats export fails on big request #2572
Conversation
…auvergne/shanoir-ng into shanoir-issue#2560
…auvergne/shanoir-ng into shanoir-issue#2560
…auvergne/shanoir-ng into shanoir-issue#2560
…auvergne/shanoir-ng into shanoir-issue#2560
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/CreateStatisticsService.java
Outdated
Show resolved
Hide resolved
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/CreateStatisticsService.java
Show resolved
Hide resolved
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/repository/DatasetRepositoryImpl.java
Outdated
Show resolved
Hide resolved
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/DatasetServiceImpl.java
Outdated
Show resolved
Hide resolved
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 |
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/CreateStatisticsService.java
Outdated
Show resolved
Hide resolved
shanoir-ng-datasets/src/main/java/org/shanoir/ng/dataset/service/CreateStatisticsService.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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
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! |
thank you! one minor item remains then we are ready, always better to use instead of an explicit close the try-with-resources, thx! |
Perfect for the code now. I approve. |
Hi @pierrehenri-dauvergne, can you please confirm, that it still runs on qualif? Thanks, if yes, I merge. Cheers, Michael |
With this parameters:
The statistics export gives an empty file (doesn't even contain the headers).
With others parameters such as:
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.