You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ontology create paths outside ingestion still race; name lock has no timeout #597
#596 serialises ensure_ontology_exists with a per-name advisory lock, closing the #588 race for ingestion and rehydration. Remaining:
Unlocked create paths.routes/ontology.py:367 (POST /ontology) and proposal_executor.py:221/543/639 (CLEAVE and other annealing creates) still check-then-create. A POST /ontology foo concurrent with an ingest into a new foo can create two nodes. Route them through a locked create helper.
No lock_timeout. If the lock holder stalls, every waiter blocks holding a pooled connection; ThreadedConnectionPool (maxconn 20, base.py:69) raises PoolError on exhaustion. Set lock_timeout on that session.
Stale test.test_race_condition_returns_winner (tests/unit/lib/test_age_client_ontology.py ~366) now exercises the under-lock re-check; its docstring and the unique-violation side effect describe the old path. The concurrency test models the lock with threading.Lock; nothing exercises it against real PG/AGE.
Items 1-3 fixed in #601 (locked create helper shared by POST /ontology, CLEAVE/MERGE and the primordial pool; 10s lock_timeout raising OntologyLockTimeout; stale test rewritten). Left open for item 4: a unique constraint on Ontology name, now possible since the only existing duplicate (#588) was repaired.
Activity
aaronsb commentedon Oct 2, 2026
Items 1-3 fixed in #601 (locked create helper shared by POST /ontology, CLEAVE/MERGE and the primordial pool; 10s lock_timeout raising OntologyLockTimeout; stale test rewritten). Left open for item 4: a unique constraint on Ontology name, now possible since the only existing duplicate (#588) was repaired.