Commit 5d4d91a
OntologyFilter: materialize each ontology once under a lock
loadOntology is a compound load + imports-closure + RDFS inference + put,
not atomic. Concurrent cold requests for the same ontology could both
materialize it (duplicating SPARQL + inference) and race each other's
writes. Double-check isCached under the repository lock so a single thread
materializes and the others reuse the result.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6b5315f commit 5d4d91a
1 file changed
Lines changed: 10 additions & 2 deletions
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
151 | 159 | | |
152 | 160 | | |
153 | 161 | | |
| |||
0 commit comments