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

ServerRegistryResourceProvider cache invalidation is problematic in multi-server environments #2255

Closed
JohnTimm opened this issue Apr 19, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@JohnTimm
Copy link
Collaborator

The ServerRegistryResourceProvider class implements both FHIRRegistryResourceProvider and FHIRPersistenceInterceptor. Registry resources read from the persistence layer are cached in a tenant/datastore specific cache that gets invalidated on afterCreate, afterUpdate, and afterDelete events. Unfortunately this only works if the Create/update/delete was performed through the same server where the cache resides. In multi-server environments some of the nodes may end up with stale data. The caching feature should be removed from the FHIRRegistryResourceProvider or it should be cache with a time-based eviction policy.

@JohnTimm JohnTimm self-assigned this Apr 19, 2021
@JohnTimm JohnTimm added the bug Something isn't working label Apr 19, 2021
@lmsurpre lmsurpre added this to the Sprint 2021-05 milestone Apr 19, 2021
@kmbarton423
Copy link
Contributor

created a CodeSystem resource containing code=icecream
GET https://localhost:9443/fhir-server/api/v4/CodeSystem/hungrycaterpillar/$validate-code?code=icecream
immediately updated the CodeSystem removing code=icecream
repeated $validate multiple times to confirm that the cached code was evicted within a minute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants