You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2010/07/09 15:21:16 UTC
svn commit: r962516 -
/activemq/trunk/kahadb/src/main/java/org/apache/kahadb/journal/DataFileAppender.java
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;