activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r962516 - /activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
Date Fri, 09 Jul 2010 13:21:16 GMT
Author: gtully
Date: Fri Jul  9 13:21:16 2010
New Revision: 962516

URL: http://svn.apache.org/viewvc?rev=962516&view=rev
Log:
remove duplicate sync, order is now down to the enqueueMutex only which is still consistent
as it is only accessed from this place

Modified:
    activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java

Modified: activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java?rev=962516&r1=962515&r2=962516&view=diff
==============================================================================
--- activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java (original)
+++ activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java Fri
Jul  9 13:21:16 2010
@@ -168,17 +168,9 @@ class DataFileAppender {
         location.setSize(size);
         location.setType(type);
 
-        WriteBatch batch;
         WriteCommand write = new WriteCommand(location, data, sync);
 
-        // Locate datafile and enqueue into the executor in sychronized block so
-        // that writes get equeued onto the executor in order that they were
-        // assigned
-        // by the data manager (which is basically just appending)
-
-        synchronized (this) {
-            batch = enqueue(write);
-        }
+        WriteBatch batch = enqueue(write);
         location.setLatch(batch.latch);
         if (sync) {
             try {
@@ -203,12 +195,9 @@ class DataFileAppender {
         location.setSize(size);
         location.setType(type);
 
-        WriteBatch batch;
         WriteCommand write = new WriteCommand(location, data, onComplete);
 
-        synchronized (this) {
-            batch = enqueue(write);
-        }
+        WriteBatch batch = enqueue(write);
  
         location.setLatch(batch.latch);
         return location;



Mime
View raw message