-
Notifications
You must be signed in to change notification settings - Fork 354
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
Use try-with-resources to close BatchHandler #15661
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #15661 +/- ##
=============================================
+ Coverage 49.92% 66.21% +16.28%
- Complexity 23372 31276 +7904
=============================================
Files 3483 3483
Lines 129910 129911 +1
Branches 15181 15181
=============================================
+ Hits 64864 86022 +21158
+ Misses 58984 36802 -22182
- Partials 6062 7087 +1025
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1269 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
...nalytics/src/main/java/org/hisp/dhis/analytics/table/JdbcOwnershipAnalyticsTableManager.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! |
* Use try-with-resources to close BatchHandler * Rework test to deal with multi-threading * Add try-catch to Analytics table manager
* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] (2.39) (#15625) * fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] * fix: test setup * fix: controller imports use interface not impl * Use try-with-resources to close BatchHandler (#15661) (#15704) * Use try-with-resources to close BatchHandler * Rework test to deal with multi-threading * Add try-catch to Analytics table manager --------- Co-authored-by: Jan Bernitt <[email protected]>
* fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] (2.39) (#15625) (#15710) * fix: always flush the batch handler for CompleteDataSet import [DHIS2-15362] * fix: test setup * fix: controller imports use interface not impl * Use try-with-resources to close BatchHandler (#15661) (#15704) (#15711) * Use try-with-resources to close BatchHandler * Rework test to deal with multi-threading * Add try-catch to Analytics table manager --------- Co-authored-by: Jan Bernitt <[email protected]>
This is a continuation of https://dhis2.atlassian.net/browse/DHIS2-15362 which seemed not to fully solve the issue with leaked DB connections. BatchHanlder from the quick package is now
AutoCloseable
and can thus be used in a try-with-resources block. This should help to ensure that all DB connections are completely closed.