summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Queue.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Introduce broker::Cluster interface.Alan Conway2010-10-181-27/+99
| | | | | | | | | See cpp/src/qpid/cluster/new-cluster-design.txt and new-cluster-plan.txt. qpid/cpp/src/tests/BrokerClusterCalls.cpp is a unit test that verifies the broker makes the expected calls on broker::Cluster in various situations. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1023966 13f79535-47bb-0310-9956-ffa450edef68
* Revert commits r981517 and r981435 that moved periodic purging of queues ↵Gordon Sim2010-08-111-4/+22
| | | | | | onto cluster's timer. If the timer fires during an update it causes errors; it also puts a potentially time consuming task on the clusters dispatch thread. Instead don't purge LVQs to avoid cluster inconsistencies (and more directly the assertion that aims to prevent these). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@984357 13f79535-47bb-0310-9956-ffa450edef68
* Defer delivery of messages in cluster-unsafe context.Alan Conway2010-07-051-0/+3
| | | | | | | | | | | | | | | Messages enqueued in a cluster-safe context are synchronized across the cluster. However some messages are delivered in a cluster-unsafe context, for example raising a link established event occurs the connection thread of the establishing connection. This fix deferrs such messages by multicasting them so they can be re-delived in a cluster safe context. See https://bugzilla.redhat.com/show_bug.cgi?id=611543 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@960681 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2691: ensure ttl adjustment uses correct expiration on cloned messageGordon Sim2010-06-241-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@957511 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2670: copy-on-write when tagging message for loop detectionGordon Sim2010-06-151-3/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@954933 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2004: Now that connections are cleaned up on shutdown, some cluster ↵Gordon Sim2010-06-021-1/+0
| | | | | | safety assertions need to be relaxed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@950735 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2588: Prevent queue being destroyed while still in use.Gordon Sim2010-05-151-7/+40
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@944683 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2588: Ensure we do not make calls on store for a given queue once it ↵Gordon Sim2010-05-131-1/+9
| | | | | | has been destroyed git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@944016 13f79535-47bb-0310-9956-ffa450edef68
* BZ572245: Clustering can force message persistence when one node remains. ↵Kim van der Riet2010-04-281-5/+10
| | | | | | Fix for problem in which forcing persistence on one queue but not another results in an error if a message is sent to both and the message is consumed from the non-forced queue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@939014 13f79535-47bb-0310-9956-ffa450edef68
* Code cleanup Ted Ross2010-04-231-20/+8
| | | | | | | | | | - Removed IdAllocator (it's no longer needed) - Cleaned up the calls to ManagementAgent::addObject to handle durable objects - Removed the deferred call to addObject for durable objects - Removed unneeded calls to self._checkClosed() in qmf.console.Agent git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@937516 13f79535-47bb-0310-9956-ffa450edef68
* Fix for QPID-2470 - Broker does not honour flow-to-disk policy on recoveryKim van der Riet2010-04-131-1/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@933711 13f79535-47bb-0310-9956-ffa450edef68
* Merged the changes from the qmf-devel0.7a branch back to the trunk.Ted Ross2010-03-311-1/+1
| | | | | | | | | | | | | | | | | This is a checkpoint along the QMFv2 development path. This update introduces portions of QMFv2 into the code: - The C++ agent (qpid/agent) uses QMFv2 for data and method transfer o The APIs no longer use qpid::framing::* o Consequently, boost is no longer referenced from the API headers. o Agents and Objects are now referenced by strings, not numbers. o Schema transfer still uses the QMFv1 format. - The broker-resident agent can use QMFv1 or QMFv2 based on the command line options. It defaults to QMFv1 for compatibility. - The pure-python QMF console (qmf.console) can concurrently interact with both QMFv1 and QMFv2 agents. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929716 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2454 Messages set with a TTL expire immediately when sent on qpid ↵Carl C. Trieloff2010-03-261-0/+1
| | | | | | queues with LVQ ordering git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@928003 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2365 - Reroute messages from a queue featureTed Ross2010-01-291-8/+57
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904654 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2347: Signal deletion of queue to active subscribers via a ↵Gordon Sim2010-01-221-1/+21
| | | | | | resource-deleted exception. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@902055 13f79535-47bb-0310-9956-ffa450edef68
* Cluster-safe assertions.Alan Conway2010-01-201-2/+13
| | | | | | | | | Assert that replicated data structures are modified in a cluster-safe context - in cluster delivery thread or during update. Assertions added to Queue.cpp and SemanticState.cpp. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@901282 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2295: Clustered + persistent broker crashes with inconsistency error.Alan Conway2010-01-181-10/+0
| | | | | | | | | | Code running in the store's timer thread was causing inconsistent changes in message allocation. This code is out-of-date, we no longer need to notify the Queue when persistent storage completes as the message is already available on the queue. Removed the out-dated code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@900448 13f79535-47bb-0310-9956-ffa450edef68
* Removed dead code: OutputTask::hasOutput and Queue::checkForMessages.Alan Conway2010-01-141-26/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@899356 13f79535-47bb-0310-9956-ffa450edef68
* fix & test QPID-2320Carl C. Trieloff2010-01-061-6/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896687 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2278: Encode alternate exchange information at the end of the buffer ↵Gordon Sim2009-12-161-4/+6
| | | | | | for backward compatibility with stores created from older versions git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@891195 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2266: error sending update: Enqueue capacity threshold exceededAlan Conway2009-12-111-1/+1
| | | | | | | | | Fix for the problem with a test to verify that messages going to the store have the same headers and content-size for an updatee or a broker that receives the publish directly. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@889813 13f79535-47bb-0310-9956-ffa450edef68
* Change from linear to binary search in requeueGordon Sim2009-11-131-5/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@835808 13f79535-47bb-0310-9956-ffa450edef68
* Also remove liner search from seek() & add testsCarl C. Trieloff2009-11-101-6/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834607 13f79535-47bb-0310-9956-ffa450edef68
* remove looping for position search and replace with stl algorithms for ↵Carl C. Trieloff2009-11-091-37/+58
| | | | | | better performance git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834172 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2191: Fix browsing behaviour where messages may have been released out ↵Gordon Sim2009-11-091-1/+5
| | | | | | of order git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834026 13f79535-47bb-0310-9956-ffa450edef68
* Erasing an iterator invalidates the iterator; changed the code to not ↵Stephen D. Huston2009-11-031-2/+5
| | | | | | dereference an iterator that was just deleted. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@832233 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2181 - Alternate exchange on queue is not visible in management toolsTed Ross2009-10-301-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@831351 13f79535-47bb-0310-9956-ffa450edef68
* Fixed problem of queue alternate-exchange property not being persisted on ↵Kim van der Riet2009-10-291-2/+17
| | | | | | persistent queues, and on recovery this property is lost. No tests exist as yet for this. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@831082 13f79535-47bb-0310-9956-ffa450edef68
* r817742 (the fix for QPID-2102) did not cover the case for 2pc transactions ↵Gordon Sim2009-10-181-0/+4
| | | | | | recovered in the prepared state; this fixes that case. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@826460 13f79535-47bb-0310-9956-ffa450edef68
* Transient flow-to-disk messages switched to store from BDB. Only ↵Kim van der Riet2009-09-281-2/+2
| | | | | | single-queue transient messages are handled at this point, multi-queue bindings are blocked under all circumstances to prevent routing order dependencies from making the outcome inconsistent. BZ525813 - "Move Flow to disk from BDB to journal" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819600 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2102: Changed QueuePolicy to rely on external locking and require ↵Gordon Sim2009-09-281-10/+9
| | | | | | | | | | dequeues to be handled by policy user rather. (r817742 introduced a deadlock in ring queue policy which this checkin fixes) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@819505 13f79535-47bb-0310-9956-ffa450edef68
* This patch requires svn 817742, corrects the lock issue for ring queue in ↵Carl C. Trieloff2009-09-231-11/+17
| | | | | | 817742, and protects replication when used together with flow to disk git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@818244 13f79535-47bb-0310-9956-ffa450edef68
* Joint checkin from gsim, kpvdr, cctrieloff. See QPID-2102: Exceeding reject ↵Kim van der Riet2009-09-221-27/+34
| | | | | | queue policy under a transaction causes broker crash git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817742 13f79535-47bb-0310-9956-ffa450edef68
* Reversed checkin of r.813825 until its problems can be resolvedKim van der Riet2009-09-141-63/+75
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@814692 13f79535-47bb-0310-9956-ffa450edef68
* Joint checkin with cctrieloff. Refactor of exchange routing so that ↵Kim van der Riet2009-09-111-75/+63
| | | | | | multi-queue policy differences may be resolved and allow for correct multi-queue flow-to-disk behavior. Different queues may have differing policies and persistence properties - these were previously being neglected. New c++ test added. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@813825 13f79535-47bb-0310-9956-ffa450edef68
* handle fail setting last-node-standing with unit test, still needs system testCarl C. Trieloff2009-07-311-10/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799658 13f79535-47bb-0310-9956-ffa450edef68
* Make replication of queue events not dependant on abs queue position, but ↵Carl C. Trieloff2009-07-301-0/+4
| | | | | | rather use source queue sequence numbers. Also add in more error checking and tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799435 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Fix to cover this case:Carl C. Trieloff2009-07-081-0/+4
| | | | | | | | | | | | | 1. start two nodes 2. create cluster durable queue and add some messages 3. kill one node (trigger force-persistent behaviour) 4. stop and recover remaining node 5. add another node 6. kill that new node again git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792285 13f79535-47bb-0310-9956-ffa450edef68
* fix for regression in patch & test to prevent regression againCarl C. Trieloff2009-07-081-1/+1
| | | | | | | | | | | | | | | | | Simulate this: 1. start 2 nodes 2. create cluster durable lvq 3. send a transient message to the queue 4. kill one of the nodes (to trigger force persistent behaviour)... 5. then restart it (to turn off force persistent behaviour) 6. send another transient message with same lvq key as in 3 7. kill the second node again (retrigger force persistent) 8. stop and recover the first node git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792259 13f79535-47bb-0310-9956-ffa450edef68
* More tests and complete fix for svn791672 commit -- correct requeueCarl C. Trieloff2009-07-081-5/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792208 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1974: Fixes (and tests) for updating lvq state to new cluster members.Gordon Sim2009-07-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@792103 13f79535-47bb-0310-9956-ffa450edef68
* More tests and completion of fix for 791672Carl C. Trieloff2009-07-071-5/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@791858 13f79535-47bb-0310-9956-ffa450edef68
* Corrected the case where message on more than one queue does not persist ↵Carl C. Trieloff2009-07-071-1/+1
| | | | | | when last node standing is enabled git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@791672 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1936: Fix potential deadlock for durable ring queueGordon Sim2009-06-231-1/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@787625 13f79535-47bb-0310-9956-ffa450edef68
* Performance improvements in AggregateOutput and SemanticState.Alan Conway2009-06-161-0/+2
| | | | | | | | | | | | | | Replaced AggregateOutput hierarchy with a flat list per connection holding only the OutputTasks that are potentially active. Tasks are droped from the list as soon as they return false, and added back when they may have output. Inlined frequently-used SequenceNumber functions. Replace std::list in QueueListeners with std::vector. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@785408 13f79535-47bb-0310-9956-ffa450edef68
* Lock should be released in LVQ before dequeuing old message to prevent ↵Gordon Sim2009-06-091-0/+1
| | | | | | possible deadlocks when a store plugin is loaded. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782979 13f79535-47bb-0310-9956-ffa450edef68
* Fix change in test logic introduced by r782075.Gordon Sim2009-06-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782555 13f79535-47bb-0310-9956-ffa450edef68
* Further fix to new cluster member state transfer to fix a case where unacked ↵Gordon Sim2009-06-051-2/+7
| | | | | | messages on ring policy queue cause inconsistencies in queue state between nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@782075 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1488: Ensure policy state (+ store state & mgmt stats) are accurate on ↵Gordon Sim2009-05-271-0/+13
| | | | | | | | | | | | | | newly joined nodes by informing the queue of any logically enqueued messages that are currently acquired (but not accepted or released). QPID-1873: Ensure that the various properties of a queue (durability, exclusivity etc) are correctly replicated to new cluster members. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779183 13f79535-47bb-0310-9956-ffa450edef68