summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpid/broker/QueueRegistry.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QPID-7207: remove cpp and python subdirs from svn trunk, they have migrated ↵Robert Gemmell2016-07-051-183/+0
| | | | | | to their own git repositories git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1751566 13f79535-47bb-0310-9956-ffa450edef68
* QPID-7306: fix regression in earlier commitGordon Sim2016-06-271-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1750390 13f79535-47bb-0310-9956-ffa450edef68
* QPID-7306: Fix race conditions during Queue destruction.Alan Conway2016-06-221-2/+15
| | | | | | | | | | | | | | | | | | | | | | | Stack traces indicate a Queue was being destroyed concurrently while still in use by its ManagedObject. ManagedObject holds a plain pointer to the Manageable object (e.g. Queue) it belongs to. The Manageable calls ManagedObject::resourceDestroy() when it is deleted, but without any locking. Added a locked wrapper class ManageablePtr so destroy is atomic with respect to other calls via ManageablePtr, calls after pointer is reset to 0 in destroy() are skipped. Call resourceDestroy() in Queue::~Queue if it was not called already. This is probably redundant given given the fixes above but can't hurt. Queue::destroyed() was also being called without locking and could be called concurrrently, e.g. if auto-delete happens concurrently with delete via QMF or by a 0-10 client. Moved the destroyed() call into QueueRegistry::destroy(), using QueueRegistry lock to guarantee it is called exactly once. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1749782 13f79535-47bb-0310-9956-ffa450edef68
* QPID-7302: Restart delayed auto-delete timer if the queue is declaredGordon Sim2016-06-151-9/+34
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1748523 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5084: Track durable queue ownership across restarts; a patch from Pavel ↵Justin Ross2013-09-231-0/+2
| | | | | | Moravec and Ernie Allen git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1525587 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5132: HA crash in test_tx_join_leave caused by double delete of queue. Alan Conway2013-09-111-1/+3
| | | | | | | | | | | | | Fix crash caused by double-delete of transaction queue when a broker joins while a transaction is in progress. - Ignore mode for non-participants in TX. - Try/catch around queue & exchange deletion. - Consistent use of QueueRegistry::get when queues are required. - Remove unnecessary exchange delete warning. - Remove HaBroker::delete, use realm@username when deleting queues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1522031 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: Renamed ConfigurationObserver as BrokerObserver.Alan Conway2013-08-011-3/+3
| | | | | | | | This class really was intended as a observer for broker-level events which includes configuration but may in future include other non-configuration events such as transactions. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509420 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4630: HA Fix starting from persistent store.Alan Conway2013-03-071-6/+3
| | | | | | | | | | This was implemented in r1390123 but broken by subsequent changes. When re-starting a persistent HA cluster, the broker that becomes primary keeps its recovered queues while backup brokers discard their recovered queues and catch up from the primary. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1453971 13f79535-47bb-0310-9956-ffa450edef68
* Bug 886656 - HA backup broker does not properly increment the alternate ↵Alan Conway2012-12-201-3/+1
| | | | | | | | exchange user count Set alternate exchange in-use counters correctly on backup brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424617 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4428: HA add UUID tag to avoid using an out of date queue/exchange.Alan Conway2012-11-141-13/+15
| | | | | | | | | | | | | | | | | Imagine a cluster with primary A and backups B and C. A queue Q is created on A and replicated to B, C. Now A dies and B takes over as primary. Before C can connect to B, a client destroys Q and creates a new queue with the same name. When B connects it sees Q and incorrectly assumes it is the same Q that it has already replicated. Now C has an inconsistent replica of Q. The fix is to tag queues/exchanges with a UUID so a backup can tell if a queue is not the same as the one it has already replicated, even if the names are the same. This all also applies to exchanges. - Minor imrovements to printing UUIDs in a FieldTable. - Fix comparison of void Variants, added operator != git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409241 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4394: HA QMF events out of orderAlan Conway2012-11-011-2/+30
| | | | | | | | | | | | | | | | QMF create/delete events for auto-delete queues can be generated out-of-order because they are not regulated by any lock. This creates problems for HA replication. This commit does 2 things: 1. Dispatch QMF events via a pollable queue. Events are encoded in the thread calling raiseEvent then put on a PollableQueue to be dispatched in a separate thread. This allows us to move the raiseEvent calls inside registry locks to ensure they are ordered. 2. Move queue create and delete raiseEvent calls inside the queue registry lock so they are executed in order. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1404590 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4234: ensure configuration observers see queue deletionGordon Sim2012-08-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1373831 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4178: broker refactoringGordon Sim2012-08-101-45/+18
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1371676 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4144 HA broker deadlocks on broker::QueueRegistry lock and ha::Primary lockAlan Conway2012-07-171-11/+10
| | | | | | | | | | | | Running tests repeatedly, the broker deadlocked with the attached stack trace. The problem call sequences are: 1. QueueRegistry::destroy takes QueuerRegistry lock > ConfigurationObserver::queueDestroy > ha::Primary::queueDestroy takes Primary lock. 2. ConnectionObserver::opened cals Primary::opened lock> RemoteBackup>getQueues().eachQueue This patch breaks the deadlock at both ends: QueueRegistry no longer holds the lock across the observer call and Primary does not hold the lock across eachQueue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1362584 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3603: Move calls to ConfigurationObserver outside of locks.Alan Conway2012-06-121-21/+26
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1349541 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3603: Add ConfigurationObserver.Alan Conway2012-06-081-3/+9
| | | | | | | Allows plugins to observe configuration events queue create/destroy, exchange create/destroy and bind/unbind. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1348114 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3603: Consistent find/get functions for Queue and Exchange registries.Alan Conway2012-01-181-1/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1233084 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3087: Fixes to store interaction changesGordon Sim2011-02-281-3/+18
| | | | | | | | | * don't create queue on recovery * ensure laternate exchange is set before creating store record for queue git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1075331 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3087: fix for windows compilerGordon Sim2011-02-281-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1075260 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3087: fail rather than ignoring attempts to declare queues with bad ↵Gordon Sim2011-02-251-1/+4
| | | | | | arguments; ensure qpid-config can deal with different types of argument. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1074697 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3002: Configurable threshold alerts for queuesGordon Sim2011-02-151-6/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1070913 13f79535-47bb-0310-9956-ffa450edef68
* Code cleanup in broker directory.Alan Conway2010-10-141-0/+2
| | | | | | | | - Removed un-necessary #includes for broker/Queue.h - Removed "using std::string" in header files. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1022679 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793909 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1843 - Cleaned up the interface to the broker's internal management agent.Ted Ross2009-05-111-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@773570 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1721: Fixes for replication between clusters when new members are addedGordon Sim2009-03-091-2/+8
| | | | | | | | | | * suppress event generation during node catch up * ensure sequence counters used for duplicate detection are synchronised in both primary and dr clusters when new members join * connect queue with the event manager within queue registry rather than adapter as the latter path is not used for catchup git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@751719 13f79535-47bb-0310-9956-ffa450edef68
* Minor formatting fixes and typo correction.Gordon Sim2009-01-151-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@734668 13f79535-47bb-0310-9956-ffa450edef68
* Add Message callbacks for async completion.Alan Conway2008-11-061-1/+0
| | | | | | | | Add unit test for async completion. Add sync parameter to generated session functions, defaults as before but allows greater control. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@711998 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1306Carl C. Trieloff2008-09-301-1/+16
| | | | | | | | | | | | | | | | | This patch includes: - Optimistic Consume - Support for forcing Queue durable on cluster failure - Some cleanup on mgnt functions in Queue to inlines - Tests Still coming - header for client queue options - LVQ support bits. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@700489 13f79535-47bb-0310-9956-ffa450edef68
* Scope exclusive queues to sessions.Gordon Sim2008-03-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@637854 13f79535-47bb-0310-9956-ffa450edef68
* Apply patch from QPID-732 by Ted Ross.Alan Conway2008-01-141-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attached patch provides support for plugin modules in the C++ broker. - Plugins are supported (--load <lib>, --load-dir <dir> options provided) - Command options may be extended by plugins. - A workaround was added to make config-file parsing tolerant of unregistered options. - Store-specific options were removed so they can be supplied by a plugin - A pre-log facility was introduced so log messages can be generated prior to the initialization of the logging module. File-by-file details: M cpp/src/qpidd.cpp Added support for loadable plugin modules. This involves a two-phased handling of command line/config options. Phase-1 determines which modules to load and phase-2 is based on all of the command-line options supplied by qpidd and the loaded plugins. M cpp/src/Makefile.am Added dependency for boost_filesystem library. M cpp/src/qpid/Plugin.h Added 'earlyInitialize' method. Plugins are now initialized at two points: earlyInitialize is called prior to broker initialization and initialize is called at the end of broker init. This allows modules like the store to be hooked in early and other modules to be able to assume that the broker target is fully functional. M cpp/src/qpid/cluster/ClusterPlugin.cpp Added stub for the new pure-virtual earlyInitialize method. M cpp/src/qpid/Options.h M cpp/src/qpid/Options.cpp Added 'allowUnknown' option in the parse method. This is needed in phase-1 command processing when there are options for not-yet-loaded plugin modules. Because the stable version of boost does not permit 'allowUnknown' for config files, a workaround has been implemented in this module to pre-filter the config file text removing lines that represent unknown options. M cpp/src/qpid/broker/Broker.h M cpp/src/qpid/broker/Broker.cpp Removed all store-specific command options. Updated logic to allow the store to be a plugin module. M cpp/src/qpid/broker/DtxManager.h M cpp/src/qpid/broker/DtxManager.cpp M cpp/src/qpid/broker/QueueRegistry.h M cpp/src/qpid/broker/QueueRegistry.cpp Changed API to these classes such that the store is no longer supplied in the constructor but is supplied later, before any operations are called for. M cpp/src/qpid/broker/MessageStoreModule.h M cpp/src/qpid/broker/MessageStoreModule.cpp This module is still needed to provide "exception transfer" service. It was changed to not load the store module but rather use the already-loaded plugin store. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@611823 13f79535-47bb-0310-9956-ffa450edef68
* Patch QPID-680 from trossCarl C. Trieloff2007-11-131-37/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@594364 13f79535-47bb-0310-9956-ffa450edef68
* AMQP 670 This patch contains the following:Carl C. Trieloff2007-11-041-1/+6
| | | | | | | | | | 1) "using" clauses were removed from one header file. This required changes in other header and body files that were relying on that clause. 2) The object indexing scheme has been improved in the management schema. Objects now properly reference their parent/containing objects. 3) The framework for parsing management commands has been added. 4) The python management API has been improved and now includes an object-method call. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@591715 13f79535-47bb-0310-9956-ffa450edef68
* Patch from TedCarl C. Trieloff2007-10-311-2/+2
| | | | | | | | | | | | | QPID-668 This patch does two things: 1) Adds management objects for "broker" and "virtual host". 2) Moves all management-related source files from qpid/broker to qpid/broker/management. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@590806 13f79535-47bb-0310-9956-ffa450edef68
* - QPID-667Carl C. Trieloff2007-10-311-2/+6
| | | | | | | | | - for Ted Ross - built and tested. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@590523 13f79535-47bb-0310-9956-ffa450edef68
* - added patch from TeddCarl C. Trieloff2007-10-261-24/+24
| | | | | | | | - QPID-660 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@588478 13f79535-47bb-0310-9956-ffa450edef68
* QPID-651 applied patch from TedCarl C. Trieloff2007-10-191-1/+36
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@586578 13f79535-47bb-0310-9956-ffa450edef68
* - Added RW lockCarl C. Trieloff2007-07-051-3/+3
| | | | | | | | | | | - Updated all exchanges to us RW lock - Updated all registries to us RW lock - Still need to do (client, channel, message and queues) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@553549 13f79535-47bb-0310-9956-ffa450edef68
* Autodeletable shared queues are now deleted as soon as the consumer count ↵Gordon Sim2007-07-031-1/+1
| | | | | | | | | | drops to zero (i.e. there is no timeout). This closes QPID-533. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@552751 13f79535-47bb-0310-9956-ffa450edef68
* Moved src/ source code to src/qpid directory:Alan Conway2007-04-131-0/+78
| | | | | | | | | | | - allows rhm package to build consistently against checked-out or installed qpid. - consistent correspondence between source paths and C++ namespaces. - consistent use of #include <qpid/foo> in source and by users. - allows header files to split over multiple directories, e.g. separating generated code, separating public API from private files. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@528668 13f79535-47bb-0310-9956-ffa450edef68
* 2006-12-01 Jim Meyering <meyering@redhat.com>Alan Conway2006-12-011-75/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This delta imposes two major changes on the C++ hierarchy: - adds autoconf, automake, libtool support - makes the hierarchy flatter and renames a few files (e.g., Queue.h, Queue.cpp) that appeared twice, once under client/ and again under broker/. In the process, I've changed many #include directives, mostly to remove a qpid/ or qpid/framing/ prefix from the file name argument. Although most changes were to .cpp and .h files under qpid/cpp/, there were also several to template files under qpid/gentools, and even one to CppGenerator.java. Nearly all files are moved to a new position in the hierarchy. The new hierarchy looks like this: src # this is the new home of qpidd.cpp tests # all tests are here. See Makefile.am. gen # As before, all generated files go here. lib # This is just a container for the 3 lib dirs: lib/client lib/broker lib/common lib/common/framing lib/common/sys lib/common/sys/posix lib/common/sys/apr build-aux m4 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@481159 13f79535-47bb-0310-9956-ffa450edef68
* update Apache licenses to the current versionStephen Vinoski2006-11-101-13/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@473568 13f79535-47bb-0310-9956-ffa450edef68
* Added POSIX equivalents to APR classes used by clients, inlined trivial calls.Alan Conway2006-11-091-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@473087 13f79535-47bb-0310-9956-ffa450edef68
* More reorg to separate APR/posix code, work in progress.Alan Conway2006-11-081-4/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@472545 13f79535-47bb-0310-9956-ffa450edef68
* Minor source reorg, see README.Alan Conway2006-11-061-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@471789 13f79535-47bb-0310-9956-ffa450edef68
* Added some methods to MessageStore interface and hooked these in where ↵Gordon Sim2006-11-031-4/+4
| | | | | | appropriate. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@470810 13f79535-47bb-0310-9956-ffa450edef68
* IO refactor phase 1. Reduced dependencies, removed redundant classes.Alan Conway2006-10-311-1/+1
| | | | | | | Renamed pricipal APR classes in preparation for move to apr namespace. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@469625 13f79535-47bb-0310-9956-ffa450edef68
* Initial implementation for tx class.Gordon Sim2006-10-301-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@469242 13f79535-47bb-0310-9956-ffa450edef68
* Renamed unit tests to follow naming conventions, fixed some #include ↵Alan Conway2006-10-161-3/+3
| | | | | | inconsistencies. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@464503 13f79535-47bb-0310-9956-ffa450edef68
* Build system reorg, see README and Makefile comments for details.Alan Conway2006-10-161-0/+72
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@464494 13f79535-47bb-0310-9956-ffa450edef68