search parameter extraction leads to registry lookup for implicit systems #2863
Labels
bug
Something isn't working
P2
Priority 2 - Should Have
performance
performance
reindex
Resolution of issue will require a $reindex during upgrade
Milestone
Describe the bug
We store (and retrieve) code values with their implicit system value. This makes it much faster to search for a value like 'status=active' because we can bind it to the particular system that the active code is associated with (instead of doing a system-less search in the db for any code with a value of "active").
However, because we're now setting this implicit system, our extraction logic is doing a CodeSystem lookup to determine whether this CodeSystem is case-sensitive or not. Since the system doesn't exist, it never gets cached, and we end up looking for it each time. When ServerRegistryResourceProvider is enabled, that can be expensive because it makes a roundtrip to the db during the lookup.
Environment
main
To Reproduce
Steps to reproduce the behavior:
note that the ServerRegistryResourceProvider performs this search each time because none of the providers actually have a CodeSystem for this URL.
Expected behavior
We shouldn't be looking up these implicit CodeSystem resources because
Additional context
Per the following stack trace, it turns out that the lookup is actually invoked from our code that is trying to determine whether these codesystems are case-sensitive or not:
The text was updated successfully, but these errors were encountered: