accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <david.medin...@gmail.com>
Subject Double Synchronization in TabletServer Class?
Date Wed, 02 Jan 2013 15:44:07 GMT
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?

Mime
View raw message