Skip to content

UFAL/Health report license summary#1146

Merged
milanmajchrak merged 2 commits intodtq-devfrom
ufal/cherrypick-health-report-license-summary
Nov 12, 2025
Merged

UFAL/Health report license summary#1146
milanmajchrak merged 2 commits intodtq-devfrom
ufal/cherrypick-health-report-license-summary

Conversation

@Paurikova2
Copy link
Collaborator

Phases MP MM MB MR JM Total
ETA 0 0 0 0 0 0
Developing 0.5 0 0 0 0 0
Review 0 0 0 0 0 0
Total - - - - - 0
ETA est. 0
ETA cust. - - - - - 0

Problem description

Cherry-picked from VSB-TUO to improve the performance of the health report license summary.

* 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
@Paurikova2 Paurikova2 requested a review from Copilot November 5, 2025 09:35
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 LicenseCheck to 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.

@Paurikova2 Paurikova2 linked an issue Nov 5, 2025 that may be closed by this pull request
@Paurikova2 Paurikova2 self-assigned this Nov 5, 2025
@milanmajchrak milanmajchrak merged commit cf0b0c6 into dtq-dev Nov 12, 2025
20 checks 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.

UFAL/Health report performance

4 participants