diff options
author | Robert Godfrey <rgodfrey@apache.org> | 2008-05-15 21:23:53 +0000 |
---|---|---|
committer | Robert Godfrey <rgodfrey@apache.org> | 2008-05-15 21:23:53 +0000 |
commit | 221e46668fe6e1830153e66cef3d0e9a7f8d8477 (patch) | |
tree | 994b9cb595a11745464e2d04b53d97f3ed8440d4 | |
parent | 72d95cd01b4c6e6d5b26a8baa0a9ed49e0160a97 (diff) | |
download | qpid-python-221e46668fe6e1830153e66cef3d0e9a7f8d8477.tar.gz |
Fixed credit restoration, turned off biased write pool by default, removed unused lock from queue
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/broker-queue-refactor@656849 13f79535-47bb-0310-9956-ffa450edef68
3 files changed, 2 insertions, 17 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java b/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java index db3a05eb52..caf34f13bd 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java +++ b/java/broker/src/main/java/org/apache/qpid/server/ack/TxAck.java @@ -116,6 +116,7 @@ public class TxAck implements TxnOp //make persistent changes, i.e. dequeue and decrementReference for (QueueEntry msg : _unacked.values()) { + msg.restoreCredit(); //Message has been ack so discard it. This will dequeue and decrement the reference. msg.discard(storeContext); diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java index 9c8b703bb5..a3709641f0 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java +++ b/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java @@ -80,19 +80,6 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener private final AtomicBoolean _quiesced = new AtomicBoolean(false); - /** - * the _enqueueLock is used to control the entry of new messages onto the queue. In normal operation many threads - * may concurrently enqueue messages. However while certain operations are being carried out (e.g. clearing the - * queue), it is important to prevent new messages being added to the queue. To obtain this behaviour we use the - * readLock for shared "enqueue" access and the write lock for the exclusive access. - */ - // private final ReadWriteLock _enqueueLock = new ReentrantReadWriteLock(); - - - private final Lock _subscriberLock = new ReentrantLock(); - -// private final List<Subscription> _subscriberList = new CopyOnWriteArrayList<Subscription>(); - private final SubscriptionList _subscriptionList = new SubscriptionList(this); private final AtomicReference<SubscriptionList.SubscriptionNode> _lastSubscriptionNode = new AtomicReference<SubscriptionList.SubscriptionNode>(_subscriptionList.getHead()); @@ -294,9 +281,6 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener throw new NullPointerException("subscription argument is null"); } - - - boolean removed = _subscriptionList.remove(subscription); diff --git a/java/broker/src/main/java/org/apache/qpid/server/transport/ConnectorConfiguration.java b/java/broker/src/main/java/org/apache/qpid/server/transport/ConnectorConfiguration.java index 83e348b9f2..b67bb98e28 100644 --- a/java/broker/src/main/java/org/apache/qpid/server/transport/ConnectorConfiguration.java +++ b/java/broker/src/main/java/org/apache/qpid/server/transport/ConnectorConfiguration.java @@ -98,7 +98,7 @@ public class ConnectorConfiguration public boolean _multiThreadNIO; @Configured(path = "advanced.useWriteBiasedPool", - defaultValue = "true") + defaultValue = "false") public boolean useBiasedWrites; |