Repository navigation
2026 11 gg big bug hunt - #331
Conversation
|
RxNorm relationship filters with an The new query takes the target concept from Works today on tx.fhir.org and tx-dev: curl -s -X POST https://tx.fhir.org/r4/ValueSet/\$expand \
-H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' \
-d '{"resourceType":"Parameters","parameter":[{"name":"valueSet","resource":{"resourceType":"ValueSet","compose":{"include":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","filter":[{"property":"has_ingredient","op":"=","value":"AUI:828"}]}]}}}]}'
# -> 105050 Parlodel 5 MG Oral Capsule, 105446 Parlodel 2.5 MG Oral TabletSame filter on the provider directly (
The rows involved: sqlite3 rxnorm_03022026.db "select RXAUI1, RXCUI2, RXAUI2, RELA, SAB from rxnrel where RXAUI1='828' and RELA='has_ingredient'"
# 828||788773|has_ingredient|MMSL
# 828||790716|has_ingredient|MMSL <- RXCUI2 empty, SAB not RXNORMThe test subset in Suggested fix: for |
|
Memory guard: forced full GC on the request path (library/memory-guard.js:187–193, line 103) While the server is over the reject threshold, every 5 s the next incoming request runs What it costs: a full collection of a 1.35 GB heap of small live objects (about the size of main's heap with VSAC and the package resources) took 0.5–0.8 s on a desktop: node --expose-gc -e "const m=new Map();let i=0;while(process.memoryUsage().heapUsed<1.3e9){m.set('k'+i,{u:'http://x/'+i,v:'1.0.'+(i%50),c:[String(i)],n:i});i++}for(let r=0;r<3;r++){const t=Date.now();gc();console.log('full GC ms',Date.now()-t)}"When most of RSS is outside the JS heap, as with the SNOMED/LOINC cache buffers on tx.fhir.org, the GC frees little and the server stays over the threshold. It then pauses every 5 s for as long as memory stays high. Separately, Node documents changing V8 flags after startup ( Suggestions:
(For #330: this composes with measuring RSS minus file-backed pages. I have a merge of #330 onto this branch that keeps both and passes all the memory-guard tests, ready for when this lands.) |
|
Here's one reply covering both review comments, ready to paste: Thanks, both fixed. RxNorm Memory guard forced GC: two changes, plus a startup change:
I left the GC on the request path rather than moving it to a timer. A full collection stops the whole process wherever it's triggered, and the request that triggers it is normally being refused anyway. With the gate and back-off, futile pauses no longer repeat every 5 s. Two new tests cover the gate and the back-off. Happy to take the #330 merge once this lands. |
No description provided.