flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject git commit: FLUME-1569: MemoryChannel uses an Integer as a lock
Date Thu, 11 Oct 2012 20:11:40 GMT
Updated Branches:
  refs/heads/flume-1.3.0 fff91b4ba -> 653ce78cc


FLUME-1569: MemoryChannel uses an Integer as a lock

(Daisuke Kobayashi via Brock Noland)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/653ce78c
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/653ce78c
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/653ce78c

Branch: refs/heads/flume-1.3.0
Commit: 653ce78cc232756305ac95aeedeca06bf1af4c64
Parents: fff91b4
Author: Brock Noland <brock@apache.org>
Authored: Thu Oct 11 15:10:13 2012 -0500
Committer: Brock Noland <brock@apache.org>
Committed: Thu Oct 11 15:10:27 2012 -0500

----------------------------------------------------------------------
 .../org/apache/flume/channel/MemoryChannel.java    |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/653ce78c/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
----------------------------------------------------------------------
diff --git a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
index fc3a1e2..a656c8b 100644
--- a/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
+++ b/flume-ng-core/src/main/java/org/apache/flume/channel/MemoryChannel.java
@@ -166,7 +166,7 @@ public class MemoryChannel extends BasicChannelSemantics {
 
   // lock to guard queue, mainly needed to keep it locked down during resizes
   // it should never be held through a blocking operation
-  private Integer queueLock;
+  private Object queueLock = new Object();
 
   @GuardedBy(value = "queueLock")
   private LinkedBlockingDeque<Event> queue;
@@ -192,7 +192,6 @@ public class MemoryChannel extends BasicChannelSemantics {
 
   public MemoryChannel() {
     super();
-    queueLock = 0;
   }
 
   /**


Mime
View raw message