On 9.4.14 4:55 , Rob Ryan wrote:
I can't comment to the exact meaning of the warning, but I can say
the impact of reading from multiple threads with one session is a
significant concern in itself given the current implementation of
Oak.  Under high throughput conditions the lock contention quickly
becomes a significant performance bottleneck.

Right. In general the situation is no different from Jackrabbit 2: sessions should not be accessed concurrently from multiple threads. The repository will not corrupt if doing so but wont make any guarantees beyond that.

More specifically, concurrent session access actually *is* more prone to lock contention in Oak as it was for Jackrabbit 2 even though the granularity of the lock is the same. In Oak there are more operations where we need to acquire that lock so we can make scalability guarantees elsewhere. One example is Node#getNodes(), which return an Iterator of that node's child nodes. In Jackrabbit 2 the implementation could just return a list of child nodes eagerly pre-fetched. Since in Oak we need to support large numbers of child nodes this approach would not scale and we need to return an Iterator that lazily fetches its children, acquiring the lock each time.

Michael

Reply via email to