VSB-TUO/Fix bitstreamuuid query#1140
Merged
milanmajchrak merged 2 commits intocustomer/vsb-tuofrom Nov 4, 2025
Merged
Conversation
…eries in findByBitstreamUUIDs
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a PostgreSQL parameter limit issue in the findByBitstreamUUIDs method that was causing HealthReport (LicenseCheck) failures when processing large numbers of bitstreams. The original implementation could exceed PostgreSQL's 65,535 parameter limit when querying with many UUID parameters.
- Implements batch processing to split large UUID lists into smaller chunks
- Uses a conservative batch size of 10,000 to stay well below PostgreSQL's parameter limit
- Aggregates results from multiple batch queries to maintain the same API contract
💡 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
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 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 4, 2025
Paurikova2
added a commit
that referenced
this pull request
Nov 5, 2025
* revent PostgreSQL parameter limit error by batching bitstream UUID queries in findByBitstreamUUIDs * BATCH_SIZE as configurable constant
milanmajchrak
pushed a commit
that referenced
this pull request
Nov 12, 2025
* VSB-TUO/Health report license summary (#1135) * added select get bitstreams based on uuids, improved speed of run * incorrect indentation, removed unused map, checkstyle * VSB-TUO/Fix bitstreamuuid query (#1140) * revent PostgreSQL parameter limit error by batching bitstream UUID queries in findByBitstreamUUIDs * BATCH_SIZE as configurable constant
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
The HealthReport (LicenseCheck) fails when processing many bitstreams because the query in findByBitstreamUUIDs exceeds PostgreSQL’s 65,535 parameter limit.
@milanmajchrak Maybe changes from health report should be also in dtq-dev not only in customer/vsb-tuo