nodeServvice.checkExists <- return false for thread 1 and 2
versionIndex.store
branchIndex.store
<-------------------- thread 2 overtakes thread 1
searchIndex.store
in this case branchIndex will have data for thread 2 (last write wins) but searchIndex will have data for thread 1
If nodes are different (data, path, permissions, etc) it is a big problem. For entirely equal nodes search index will have wrong nodeVersion Id (it is called _versionkey in search index) and maybe timestamp (_ts).
It may theoretically happen in
in this case branchIndex will have data for thread 2 (last write wins) but searchIndex will have data for thread 1
If nodes are different (data, path, permissions, etc) it is a big problem. For entirely equal nodes search index will have wrong nodeVersion Id (it is called
_versionkey
in search index) and maybe timestamp (_ts
).