MID-11043 Fix 10k limit in certification queries using iterative search for native repo#614
Open
kay1313 wants to merge 1 commit into
Open
MID-11043 Fix 10k limit in certification queries using iterative search for native repo#614kay1313 wants to merge 1 commit into
kay1313 wants to merge 1 commit into
Conversation
1azyman
requested changes
Apr 29, 2026
Member
1azyman
left a comment
There was a problem hiding this comment.
Generic repository was removed in 4.10 (via #10866). Just minor changes to remove dead code.
|
|
||
| private <T extends Containerable> void searchContainers( | ||
| Class<T> type, ObjectQuery query, ObjectHandler<T> handler, OperationResult result) throws SchemaException { | ||
| if (repositoryService.isNative()) { |
Member
There was a problem hiding this comment.
AFAIK this is always true for midpoint 4.11 and 4.10 (generic, non-native repository module was removed in 4.10 - repo-sql-impl).
| return cases; | ||
| } | ||
|
|
||
| /** |
Member
There was a problem hiding this comment.
10k limit in javadoc not correct, native repo supports iterative search, generic repo removed in >=4.10
Contributor
Author
|
Removed the obsolete non-native repository fallback and the outdated Javadoc note about the 10k limit. |
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.
Description
This PR fixes an issue with certification queries on native repository where large campaigns could be silently truncated (e.g. at ~10,000 containers).
The problem was caused by using non-iterative repositoryService.searchContainers(...) in certification helpers, which may return only a limited result set for large queries on native repository. As a result, operations like stage closing or work item processing could affect only a subset of cases/work items, leaving the rest unprocessed.
Changes
Introduced a shared native-aware helper in AccCertQueryHelper:
Updated certification queries to use the helper:
This ensures full result sets are processed for large campaigns while preserving existing behavior for non-native backends.
Notes
Testing
Added regression test covering large campaign (>10k cases)
Verifies: