Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Accumulo >> mail # dev >> Double Synchronization in TabletServer Class?


Copy link to this message
-
Double Synchronization in TabletServer Class?
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?
+
Keith Turner 2013-01-02, 16:31
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB