summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Cluster.h
Commit message (Collapse)AuthorAgeFilesLines
* QPID-3858: Updated code to include recent refactoring by Gordon (gsim) - see ↵Kim van der Riet2012-08-271-332/+0
| | | | | | QPID-4178. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1377715 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3438Michael Goulish2011-12-161-0/+2
| | | | | | | fix cluster causing cnx leak when bad credentials are given in login attempt. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1215127 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3652: Fix cluster authentication.Alan Conway2011-12-061-0/+4
| | | | | | | | | | | | | | | | | | | Only allow brokers that authenticate as the cluster-username to join a cluster. New broker first connects to a cluster broker authenticates as the cluster-username and sends its CPG member ID to the qpid.cluster-credentials exchange. The cluster broker that subsequently acts as updater verifies that the credentials are valid before connecting to give the update. NOTE 1: If you are using an ACL, the cluster-username must be allowed to publish to the qpid.cluster-credentials exchange. E.g. in your ACL file: acl allow foo@QPID publish exchange name=qpid.cluster-credentials NOTE 2: This changes the cluster initialization protocol, you will need to restart the cluster with all new version brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1210989 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3544: ACL denials while replicating exclusive queues to a newly joined ↵Alan Conway2011-10-121-0/+2
| | | | | | | | node. Disabled ACL during cluster update process. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1182451 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Suppress logging of clock events in cluster code.Alan Conway2011-08-311-15/+19
| | | | | | | Clock events are much too frequent to log, doing so makes trace logging useless for clustered brokers. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1163766 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3280: Performance problem with TTL messages.Alan Conway2011-06-151-1/+13
| | | | | | | | | | | | When sending a large number of messages with nonzero TTLs to a cluster, overall message throughput drops by around 20-30% compared to messages with TTL 0. The previous approach to TTL in the cluster is replaced with a simpler "cluster clock". Also QueueCleaner is executed in the cluster timer, and modified to be deterministic in a cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1136170 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3004: Get Clang to compile qpid c++Andrew Stitcher2011-05-091-3/+3
| | | | | | | - Change class/struct declarations to be consistent with the definition to avoid warnings git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1101178 13f79535-47bb-0310-9956-ffa450edef68
* Defer update of managaement agent to end of update process.Alan Conway2010-12-081-0/+2
| | | | | | | | | | | Move updating of the management agent to the very end of the update process, after all objects used by the update process itself have been deleted. Before the fix deletions from the update process itself (deleting the qpid.cluster-update queue and its binding to the default exchange) were sporadically appearing as extra delete messages on the updatees management agent and causing inconsistency. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1043621 13f79535-47bb-0310-9956-ffa450edef68
* Check for and abort invalid catchup connections.Alan Conway2010-08-231-1/+3
| | | | | | | Detect attempt to make a catch-up connection while we are not expecting an update. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@988312 13f79535-47bb-0310-9956-ffa450edef68
* Race condition in cluster+management, inconsistent errors like:Alan Conway2010-07-231-0/+2
| | | | | | | | | | | | "confirmed < (2097+0) but only sent < (2096+0)" Management messages are generated if a managed objects properties have changed since the last update. Properties of the cluster object (members and status) were sometimes being changed outside the delivery context which could create inconsistencies in the cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@966933 13f79535-47bb-0310-9956-ffa450edef68
* Defer delivery of messages in cluster-unsafe context.Alan Conway2010-07-051-1/+9
| | | | | | | | | | | | | | | 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
* Fix cluster broker crashes when management is active.Alan Conway2010-06-221-1/+2
| | | | | | | | | | | | Cluser brokers were exiting with errors "modified cluster state outside cluster context" and "confirmed < (50+0) but only sent < (49+0)" Fix was to: - delay completion of incoming update till update connection closes. - delay addding new connections to managment until connection is announced. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@956882 13f79535-47bb-0310-9956-ffa450edef68
* Fix "mismatched cluster-id" errors during start up.Alan Conway2010-05-251-1/+1
| | | | | | | | | Intermittent failure when starting a persistent cluster with all clean stores. Some brokers fail with: critical Unexpected error: Cluster-ID mismatch. Stores belong to different clusters. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@948143 13f79535-47bb-0310-9956-ffa450edef68
* Cluster logging improvements: log config changes in the deliver thread.Alan Conway2010-03-301-1/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929274 13f79535-47bb-0310-9956-ffa450edef68
* New cluster member pushes store when joining an active cluster.Alan Conway2010-03-121-1/+3
| | | | | | | | | | | | | | | | | | | Previously a broker with a clean store would not be able to join an active cluster because the shtudown-id did not match. This commit ensures that when a broker joins an active cluster, it always pushes its store regardless of status. Clean/dirty status is only compared when forming an initial cluster. This change required splitting initialization into two phases: PRE_INIT: occurs in the Cluster ctor during early-initialize. This phase determines whether or not to push the store. INIT: occurs after Cluster::initialize and does the remaining initialization chores. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@922412 13f79535-47bb-0310-9956-ffa450edef68
* Minor cleanup: removed unused parameter of initial-status in cluster.xml.Alan Conway2010-03-051-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919662 13f79535-47bb-0310-9956-ffa450edef68
* Don't generate debug snapshot messages unless debug logging enabled.Alan Conway2010-03-051-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919523 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: debug snapshots of queue depth at broker join, help find ↵Alan Conway2010-02-021-5/+4
| | | | | | inconsistencies. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@905674 13f79535-47bb-0310-9956-ffa450edef68
* Replace PeriodicTimer with ClusterTimer, which inherits from Timer.Alan Conway2010-01-291-3/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904656 13f79535-47bb-0310-9956-ffa450edef68
* QPID_2634 Management updates in timer create inconsistencies in a cluster.Alan Conway2010-01-271-0/+2
| | | | | | | | | Cluster plugin provides a PeriodicTimer implementation to the broker which executes tasks in the cluster dispatch thread simultaneously across the cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903869 13f79535-47bb-0310-9956-ffa450edef68
* Cluster implementation of PeriodicTimer.Alan Conway2010-01-271-5/+3
| | | | | | | | | The cluster implementation multicast periodic-timer controls and executes the task when those controls are delivered, which is in the cluster delivery thread context and so consistent across the cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903867 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster elder calculation to ensure unique elder.Alan Conway2010-01-271-0/+1
| | | | | | | | Race condition in the previous algorithm allowed several cluster members to consider themselves the elder. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903826 13f79535-47bb-0310-9956-ffa450edef68
* Added config-seq counter to track config changes since cluster init.Alan Conway2010-01-061-0/+1
| | | | | | | | Config-seq is recorded persitently to help identify best store when recovering from total failure. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@896538 13f79535-47bb-0310-9956-ffa450edef68
* Consistency checks for persistent cluster startup.Alan Conway2009-11-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@884226 13f79535-47bb-0310-9956-ffa450edef68
* Verify stored cluster-id matches agreed cluster-id when joining a persistent ↵Alan Conway2009-11-241-3/+2
| | | | | | cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@883910 13f79535-47bb-0310-9956-ffa450edef68
* Support for restarting a persistent cluster.Alan Conway2009-11-241-7/+11
| | | | | | | | | | | Option --cluster-size=N: members wait for N members before recovering store. Stores marked as clean/dirty. Automatically recover from clean store on restart. Stores marked with UUID to detect errors. Not yet implemented: consistency checks, manual recovery from all dirty stores. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@883842 13f79535-47bb-0310-9956-ffa450edef68
* Integrated InitialStatusMap into cluster code.Alan Conway2009-11-171-5/+12
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881423 13f79535-47bb-0310-9956-ffa450edef68
* cluster::InitialStatusMap and unit tests, support for improved cluster join ↵Alan Conway2009-11-171-0/+1
| | | | | | protocol. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@881420 13f79535-47bb-0310-9956-ffa450edef68
* Fix cman integration to exit immediately on loss of quorum.Alan Conway2009-08-061-2/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@801740 13f79535-47bb-0310-9956-ffa450edef68
* Fixes for cluster code to compile with new stricter corosync header filesAndrew Stitcher2009-08-041-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@800921 13f79535-47bb-0310-9956-ffa450edef68
* Fix race condition in cluster error handling.Alan Conway2009-07-311-1/+1
| | | | | | | | | If different errors occured almost simultaneously on two different nodes in a cluster, there was a race condition that could cause the cluster to hang. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799687 13f79535-47bb-0310-9956-ffa450edef68
* Update queue listeners in the correct order.Alan Conway2009-07-161-15/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@794736 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-15/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Fix members joining cluster while cluster is handling client errors.Alan Conway2009-07-011-3/+5
| | | | | | | Completes the previous incomplete fix in r790163. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790397 13f79535-47bb-0310-9956-ffa450edef68
* Fix members joining cluster while cluster is handling client errors.Alan Conway2009-07-011-1/+5
| | | | | | | | | | | Previously cluster members could abort if a new member joins while existing members are handling a client error. Now if an update offer arrives while an error is in progress, the offering broker retracts the offer and the newcomer must try again. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790163 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster race condition with connections closed by broker while in use.Alan Conway2009-06-301-1/+3
| | | | | | | | | | | | | | | | If a client is using a connection that is closed at the broker end because of an error, there is a race condition that allows the connection to be incorrectly re-created on replica brokers which can cause those brokers to exit with an error that does not occur on the directly connected broker. The fix: explicitly announce new connections, shadow connections are no longer implicitly created on first use. Make error-check a cluster control so it can be handled independently of the lifecycle of the connection where an error initially occured. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@789947 13f79535-47bb-0310-9956-ffa450edef68
* Make error-check a cluster-connection control rather than a cluster control.Alan Conway2009-06-181-1/+0
| | | | | | | | | Fixes bug if an error occurs during update. As cluster controls, error-checks were being processed out of sequence with the connection data they referred to. Making them connection controls ensures they are processed in the proper order. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@786294 13f79535-47bb-0310-9956-ffa450edef68
* Performance improvements in AggregateOutput and SemanticState.Alan Conway2009-06-161-1/+1
| | | | | | | | | | | | | | 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
* Added missing locks in cluster code.Alan Conway2009-05-271-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@779235 13f79535-47bb-0310-9956-ffa450edef68
* Undo change from r774809.Alan Conway2009-05-151-6/+1
| | | | | | | | | | This fix is incorrect. The timer will go off in each member, and each one will send a response message which is replicated, resulting in a response from each member being enqueued rather than a single response. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@775182 13f79535-47bb-0310-9956-ffa450edef68
* Fix for unpredictable enqueues by timer-triggered management code in a cluster.Alan Conway2009-05-141-1/+6
| | | | | | | | | ManagementAgent uses Broker::getClusterMessageHandler() (if non-0) to enqueue timer-triggered messages. Cluster provides handler that enqueues via cluster multicast. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@774809 13f79535-47bb-0310-9956-ffa450edef68
* Improved & simplified cluster output algorithm.Alan Conway2009-04-291-5/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@769914 13f79535-47bb-0310-9956-ffa450edef68
* Fix issues when cluster is run with persistence enabled.Alan Conway2009-04-111-4/+13
| | | | | | | | | | - Handle partial failures (e.g. due to disk error): failing brokers shut down, others continue. - Enable persistence in cluster tests. - Correct message status in DeliveryRecord updates. - Remove qpid.update queue when update complete - avoid it becoming persistent git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@764204 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster TTL: replicte expiry information to newcomers.Alan Conway2009-03-091-4/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751760 13f79535-47bb-0310-9956-ffa450edef68
* Fixed race conditions in cluster.Alan Conway2009-03-081-43/+53
| | | | | | | | Execute all cluster logic in frameDeliverQueue thread, decoding only in eventDeliverQueue thread. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@751557 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: restore separate event/frame threads.Alan Conway2009-03-051-35/+27
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@750574 13f79535-47bb-0310-9956-ffa450edef68
* cluster: fix delivery-property.exchange-name set on updated messages.Alan Conway2009-03-051-2/+2
| | | | | | | | | Logging improvements, useful for debugging: - qpid/SessionState.cpp: show frame bodies with command IDs. - assign cluster-wide id number to each Event. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@750456 13f79535-47bb-0310-9956-ffa450edef68
* Replicate connection decoder fragments to new members.Alan Conway2009-03-021-7/+14
| | | | | | | | | | | | Refactoring: - Merge Decoder into ConnectionMap. - Process cluster controls in event queue thread. - Use counter not pointer for connection ID, avoid re-use. - Do all processing in event queue thread to avoid races (temporary pending performance measurements) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@749473 13f79535-47bb-0310-9956-ffa450edef68
* cluster: apply membership updates while in CATCHUP mode.Alan Conway2009-02-271-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@748651 13f79535-47bb-0310-9956-ffa450edef68
* Add FrameDecoder unit test, update comments in Cluster.h/cpp.Alan Conway2009-02-251-2/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747947 13f79535-47bb-0310-9956-ffa450edef68