Skip to content
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

Intended behavior: Max number of search results for jpa maximum fetch size and prefetch threshold #6548

Open
G-2-Z opened this issue Dec 9, 2024 · 0 comments

Comments

@G-2-Z
Copy link

G-2-Z commented Dec 9, 2024

Describe the issue
In our custom HAPI FHIR server, which is based on the jpa starter project, we encountered inconsistencies when performing searches. When performing search operations for large quantities, such as fhir/Provenance?_sort=recorded, not all existing resources are returned.

We found that the max_page_size jpa starter project config parameter is not only used for the DatabaseBackedPagingProvider.setMaximumPageSize(), but also the jpaStorageSettings.setFetchSizeDefaultMaximum().
The total number of returned resources without changed config parameters was 2004 which as far as we know is based on the SearchPreFetchThresholds (default (13, 503, 2003, -1)).

There is some math going on in the classes building the SQL Querry that also adds one to the prefetch threshold and such that we did not totally unravel. We therefore would like to confirm, if the following is the intended behavior or not:

The HAPI FHIR JPA Server will return up to X resources for a single search where X is either the jpa storage setting maximum fetch size, or the highest prefetch threshold, whatever is higher.

If this is the case, we will open another ticket in the starter project to add another config parameter or make this clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant