|
|
-
Double Synchronization in TabletServer Class?David Medinets 2013-01-02, 15:44
I was poking around in
accumulo/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java and noticed the following declaration: private final SortedMap<KeyExtent,Tablet> onlineTablets Collections.synchronizedSortedMap(new TreeMap<KeyExtent,Tablet>()); Then I also noticed this code construct in the same file: synchronized (openingTablets) { openingTablets.remove(extentToOpen); ... openingTablets.notifyAll(); } My understanding of concurrency is slight but to my untrained eye I am seeing a double synchronization. Am I missing something? |