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
jaclang 0.13.4 introduced topology_index_data in the serializer (jac/jaclang/runtimelib/impl/serializer.impl.jac). The _compute_hash function was changed to exclude this field from the hash. This causes all existing anchors in MongoDB to appear dirty (hash mismatch) on every request, triggering full graph rewrites on every walker invocation.
Impact
On jac-builder (production IDE with 76 users, 140 projects):
All 79 UserProfile → Project edges were erased within minutes of deploying with jaclang 0.13.4
Every walker rewrites every anchor it touches (because hashes don't match)
With 36 concurrent requests on IDE page load, 36 simultaneous full-graph rewrites occur
Last-writer-wins → edges silently erased
New projects also lose their edges immediately after creation
Root Cause
_compute_hash in serializer.impl.jac now excludes topology_index_data from the hash
Existing anchors in MongoDB were hashed WITH the old algorithm (no topology_index_data field existed)
New code computes a different hash for the same data → every anchor looks "modified"
The persistence layer commits every "dirty" anchor back to MongoDB on every request
Concurrent walkers each read the graph, compute work, and write back their (stale) snapshot
Last writer wins → edges from other concurrent walkers are erased
Before vs After
jaclang 0.13.3: Only actually-modified anchors get rewritten. Race condition exists but is rare (most walkers are read-only).
jaclang 0.13.4: Every anchor gets rewritten on every request due to hash mismatch. Race condition is guaranteed on any page with concurrent requests.
Reproduction
Deploy a jac-scale app with MongoDB persistence on jaclang 0.13.3
Bug
jaclang 0.13.4 introduced
topology_index_datain the serializer (jac/jaclang/runtimelib/impl/serializer.impl.jac). The_compute_hashfunction was changed to exclude this field from the hash. This causes all existing anchors in MongoDB to appear dirty (hash mismatch) on every request, triggering full graph rewrites on every walker invocation.Impact
On jac-builder (production IDE with 76 users, 140 projects):
Root Cause
_compute_hashinserializer.impl.jacnow excludestopology_index_datafrom the hashtopology_index_datafield existed)Before vs After
Reproduction
Workaround
Reverted to jaclang 0.13.3 (pre-
topology_index_datachanges). Edges stop disappearing.Suggested Fix
Either:
Related
2e4ae438a(release 0.13.4), serializer changes injac/jaclang/runtimelib/impl/serializer.impl.jac