jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject Inconsistent locking in TreeImpl.Children?
Date Tue, 28 Aug 2012 15:37:55 GMT
Hi all,

TreeImpl.Children.iterator() returns an iterator over the values of the internal children
Map without locking. Other methods accessing the children Map use read or write locks, depending
on the operation.

I'm wondering if locking is missing there or if it is even needed. The children Map is created
using the Guava:
        private final Map<String, TreeImpl> children =
                CacheBuilder.newBuilder().weakValues().<String, TreeImpl>build().asMap();

The returned map is a ConcurrentMap, which rather means locking is not necessary at all...



View raw message