Skip to content

mySystemRequestDetails not initialized in BaseResourceCacheSynchronizer when booting MDM with Partitions #6948

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cerbeor
Copy link

@cerbeor cerbeor commented May 8, 2025

Greetings,

Had an issue building a server with MDM in a partitioned environment:

  • I couldn't load my MDM subscriptions, the mySystemRequestDetails being initialized only after AFTER_SUBSCRIPTION_INITIALIZED in Boot order.

Proposition for a fix:

  • added a method to avoid redundancy in defining the RequestDetail,
  • Called in registerListener() where it was previously initialized
  • Called in doSyncResourcesWithRetry() before syncResourceRetrier creation

… as I couldn't load my subscriptions, the RequestDetail being initialized only after AFTER_SUBSCRIPTION_INITIALIZED in Boot order. Proposition for a fix: added a method to avoid redundancy in defining the RequestDetail, and calls it when using doSyncResourcesWithRetry()
@jamesagnew
Copy link
Collaborator

Are you able to add a test which demonstrates the failure without this change / verifies the fix? I don't actually get how this change makes any difference.

@cerbeor
Copy link
Author

cerbeor commented May 9, 2025

Deploying the hapi-fhir-jpaserver-starter project while activating both mdm and partititioning triggers the issue.

Here is the configuration file I used
https://github.com/cerbeor/hapi-fhir-jpaserver-starter/blob/master/src/main/resources/application.yaml

Ran it using mvn clean -Pjetty spring-boot:run

I think many solutions initializing the mySystemRequestDetails attribute at another time would work.

Here are the logs of the exception, I figured it was because the mySystemRequestDetails attribute of the CacheResourceSynchronizer was null during MDM boot.

2025-05-09T10:32:49.568-04:00 INFO 45638 --- [ main] ca.uhn.fhir.jpa.mdm.config.MdmLoader : MDM provider registered
2025-05-09T10:32:49.607-04:00 INFO 45638 --- [ main] ca.uhn.fhir.log.mdm_troubleshooting : Creating subscription mdm-Patient
2025-05-09T10:32:49.712-04:00 INFO 45638 --- [ main] ca.uhn.fhir.log.mdm_troubleshooting : Creating subscription mdm-Practitioner
2025-05-09T10:32:49.722-04:00 ERROR 45638 --- [ main] c.u.fhir.jpa.searchparam.retry.Retrier : Retry failure 1/60: ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HAPI-1319: No interceptor provided a value for pointcuts: [STORAGE_PARTITION_IDENTIFY_ANY, STORAGE_PARTITION_IDENTIFY_READ]
2025-05-09T10:32:50.226-04:00 ERROR 45638 --- [ main] c.u.fhir.jpa.searchparam.retry.Retrier : Retry failure 2/60: ca.uhn.fhir.rest.server.exceptions.InternalErrorException: HAPI-1319: No interceptor provided a value for pointcuts: [STORAGE_PARTITION_IDENTIFY_ANY, STORAGE_PARTITION_IDENTIFY_READ]

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

Successfully merging this pull request may close these issues.

2 participants