Skip to content

v1.29.2: is_of_model per-twin fallback removed (#101)

Choose a tag to compare

@nikoraes nikoraes released this 18 Sep 13:51
· 20 commits to main since this release
4e8fbb1

What's changed

  • perf: drop per-twin inheritance fallback in is_of_model (#110) — resolves #101
    • The legacy traversal ran a nested Cypher query for every candidate twin when the requested model had no precomputed property, making an scan cost O(twins × models) and appear to hang on graphs with no matching twins.
    • Now resolves inheritance solely from the requested model's precomputed array and returns when it is absent. Pre-fix: 8 952 ms over 2 000 twins (zero matches). Post-fix: 59 ms.
    • Behaviour change (deliberate): models without a property (graphs written by an older library version, or externally) no longer resolve inheritance — twins match on exact model id only. Re-submitting the affected models' DTDL via restores the property.
    • Regression test added (2000 twins, 2 s budget + 60 s hang guard); CI green across PG16/17/18 × apache/cnpg.

Compatibility

  • PG 16 / 17 / 18, apache/age and ghcr.io/konnektr-io/age CNPG flavors.