This bug happened after clearing all the caches and trying to load the nearest neighbors. It might have to do with the fact that I removed synchronisation data from a certain host. Or it might have to do with the shouldYield method we added ? It might have to do with the ReadWrite lock we implemented. Directly afterwards, the database was apparently intact. org.yellowcouch.flow.system.FlowException: Id8. 1613501 at org.yellowcouch.flow.objects.Ids.value(Ids.java:233) at org.yellowcouch.flow.objects.Memory.load(Memory.java:110) at org.yellowcouch.flow.objects.Factory.load(Factory.java:39) at org.yellowcouch.flow.objects.Factory.haveOrLoad(Factory.java:28) at org.yellowcouch.flow.objects.ObjectTree.object(ObjectTree.java:27) at org.yellowcouch.flow.index.Index.access$200(Index.java:31) at org.yellowcouch.flow.index.Index$KeyFinder.compareAgainstKey(Index.java:143) at org.yellowcouch.flow.index.Index$KeyFinder.compareAgainstKey(Index.java:85) at org.yellowcouch.flow.btree.LTree.find(LTree.java:776) at org.yellowcouch.flow.btree.BTree$BTreeIterator.find(BTree.java:252) at org.yellowcouch.flow.btree.BTree$BTreeIterator.find(BTree.java:267) at org.yellowcouch.flow.btree.BTree$BTreeIterator.find(BTree.java:267) at org.yellowcouch.flow.btree.BTree$BTreeIterator.find(BTree.java:244) at org.yellowcouch.flow.index.Index$KeyFinder.find(Index.java:126) at org.yellowcouch.bpmdj.mixedit.data.usable.UsableSongFactory$View.songUsable(UsableSongFactory.java:80) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal.allWithinBounds(NnLocal.java:169) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal.allWithinBounds(NnLocal.java:253) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal.updateSongSet(NnLocal.java:593) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal.updateNearestNeighbors(NnLocal.java:112) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal.access$000(NnLocal.java:30) at org.yellowcouch.bpmdj.mixedit.nn.NnLocal$1.stateChanged(NnLocal.java:59) at org.yellowcouch.flow.petrinet.PetriNet.runQueue(PetriNet.java:106) at org.yellowcouch.flow.petrinet.DefaultPetriNetExecutor.runQueueNow(DefaultPetriNetExecutor.java:102) at org.yellowcouch.flow.petrinet.DefaultPetriNetExecutor.run(DefaultPetriNetExecutor.java:96) at java.lang.Thread.run(Thread.java:745)