Affects Version/s: TERMS_REFACTOR_BRANCH
Fix Version/s: None
com.bigdata.btree.Node._getChild() synchronizes internally on childRefs. Based on some anecdotal evidence, it appears that we might need to be synchronized here for mutation
- but perhaps not for query. Look into this issue further as this could turn into a synchronization hot spot. There are comments in _getChild() on this topic.
Testing should be performed under both mutation and concurrent query workloads.
The worst case scenario for _getChild() would be in concurrent readers need to materialize different children of the same node. However, the synchronization blocks deliberately do NOT span the IO so even the worst case can only cause more context switches than would otherwise be desired, but will not block out threads during an IO.
Another possible way to handle this is with a write/read on a volatile field on the Node.