FHIR Chat · for loop in TermDeferredStorageSvcImpl · hapi

Stream: hapi

Topic: for loop in TermDeferredStorageSvcImpl


view this post on Zulip Jens Villadsen (Jun 16 2020 at 13:16):

@James Agnew What's the point with this line? https://github.com/jamesagnew/hapi-fhir/blob/ac0d8c0fe1897eb870baf29d9141b0914e638ce3/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/term/TermDeferredStorageSvcImpl.java#L210 ? it looks a bit magically to me

view this post on Zulip James Agnew (Jun 16 2020 at 14:28):

We're just trying to add concepts in small batches there.. E.g. if adding LOINC you're adding millions of concepts, maps, properties, valuesets, etc.. So we do this in little repeated chunks in order to avoid having huge outstanding transactions which might impact other stuff going on in the database.

Not entirely sure why 10 was chosen there though.. Probably just arbitrary.

We're likely going to rework this code as a part of our move to using Spring Batch to manage batch jobs. Hard to say whether the 10 will survive that though.. Is it causing you issues?

view this post on Zulip Jens Villadsen (Jun 16 2020 at 14:45):

Nope - loading codesystems during initialization is. Nothing big, nothing fancy. The stacktrace and issue is located in the hapi fhir Google groups

view this post on Zulip Jens Villadsen (Jun 16 2020 at 14:53):

Side effect is that valueset expansions are never stored in the database which also causes a lot of warn logging

view this post on Zulip Jens Villadsen (Jun 17 2020 at 09:45):

@James Agnew I would expect you will also stumble across this issue (https://groups.google.com/forum/#!topic/hapi-fhir/i8J1EzbPfdk) once you start working on the feature of bootstrapping an IG into the server at startup time.


Last updated: Apr 12 2022 at 19:14 UTC