UFAL/Health report license summary#1146
Merged
milanmajchrak merged 2 commits intodtq-devfrom Nov 12, 2025
Merged
Conversation
* added select get bitstreams based on uuids, improved speed of run * incorrect indentation, removed unused map, checkstyle * removed continue
* revent PostgreSQL parameter limit error by batching bitstream UUID queries in findByBitstreamUUIDs * BATCH_SIZE as configurable constant
There was a problem hiding this comment.
Pull Request Overview
This PR optimizes the performance of the health report license summary by replacing individual database queries with batch fetching. The key improvement is consolidating N queries (one per bitstream) into batched queries, significantly reducing database round-trips for large collections.
Key changes:
- Refactored
LicenseCheckto collect all bitstream UUIDs first, then fetch all license mappings in batches - Added new batch query methods (
findByBitstreamUUIDs) across the DAO, service, and interface layers - Improved error handling by moving problematic items to a structured tracking map instead of log errors
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
LicenseCheck.java |
Refactored to use batch fetching pattern, collecting UUIDs first then processing mappings in memory |
ClarinLicenseResourceMappingService.java |
Added interface method for batch UUID lookup |
ClarinLicenseResourceMappingServiceImpl.java |
Implemented batch lookup delegating to DAO layer |
ClarinLicenseResourceMappingDAO.java |
Added DAO interface method for batch UUID queries |
ClarinLicenseResourceMappingDAOImpl.java |
Implemented batch query with 10,000 record batching to handle large collections |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...pi/src/main/java/org/dspace/content/dao/impl/clarin/ClarinLicenseResourceMappingDAOImpl.java
Show resolved
Hide resolved
milanmajchrak
approved these changes
Nov 6, 2025
vidiecan
reviewed
Nov 6, 2025
...pi/src/main/java/org/dspace/content/dao/impl/clarin/ClarinLicenseResourceMappingDAOImpl.java
Show resolved
Hide resolved
vidiecan
approved these changes
Nov 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem description
Cherry-picked from VSB-TUO to improve the performance of the health report license summary.