-
Notifications
You must be signed in to change notification settings - Fork 16
Description
While stress testing datahike distribution I ran into this error earlier against version 0.3.0. I cannot make sense yet of where it is coming from, it only happened once so far during many load tests. The process run is external to any REPL and run as a dedicated server (transactor). I will investigate it further and put this here to keep a handle on the issue.
{:type java.lang.NullPointerException
:message "Cannot invoke \"me.tonsky.persistent_sorted_set.ANode.store(me.tonsky.persistent_sorted_set.IStorage)\" because \"this._children[<local2>]\" is null"
:at [me.tonsky.persistent_sorted_set.Branch store "Branch.java" 621]}]
:trace
[[me.tonsky.persistent_sorted_set.Branch store "Branch.java" 621]
176].tonsky.persistent_sorted_set.PersistentSortedSet store "PersistentSortedSet.java"
[me.tonsky.persistent_sorted_set$store invokeStatic "persistent_sorted_set.clj" 185]
[me.tonsky.persistent_sorted_set$store invoke "persistent_sorted_set.clj" 180]
...(stacktrace printing was interleaved for some reason)
There are assertions before line 621 that should blow up before. My understanding is also that nodes that are newly created (and hence don't have an address) cannot be soft references (which I use currently), so I am not sure how this child can be nil here.
Edit: Maybe one of the addresses is accidentally nulled somehow while its child is actually pointing to an already stored SoftReference.