summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/cluster/Connection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Cluster: remove un-necessary code for config-seq.Alan Conway2010-03-311-3/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@929616 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2436: Fix cluster update of remote agents.Alan Conway2010-03-081-3/+3
| | | | | | | | | The v2key of cluster agents was not being passed as part of a cluster update. This meant they were not being associated with the correct shadow connections on the updatee. This caused inconsistencies that shut down the new broker. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@920414 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2412: Support for EXTERNAL mechanism on client-authenticated SSL ↵Gordon Sim2010-03-051-8/+13
| | | | | | | | | | | | connections. On SSL connection where the clients certificate is authenticated (requires the --ssl-require-client-authentication option at present), the clients identity will be taken from that certificate (it will be the CN with any DCs present appended as the domain, e.g. CN=bob,DC=acme,DC=com would result in an identity of bob@acme.com). This will enable the EXTERNAL mechanism when cyrus sasl is in use. The client can still negotiate their desired mechanism. There is a new option on the ssl module (--ssl-sasl-no-dict) that allows the options on ssl connections to be restricted to those that are not vulnerable to dictionary attacks (EXTERNAL being the primary example). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@919487 13f79535-47bb-0310-9956-ffa450edef68
* Fix: decoding error causes cluster broker to exit.Alan Conway2010-03-011-4/+16
| | | | | | | | | | An error decoding a connection was causing the broker::Connection object to be deleted in the connection IO thread rather than the cluster deliver thread, causing an exit with "critical Modified cluster state outside of cluster context" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@917734 13f79535-47bb-0310-9956-ffa450edef68
* Consistent connection names across a cluster.Alan Conway2010-02-051-19/+33
| | | | | | | | | - use the same host:port for connections and their shadows. - add shadow property to managment connection to identify shadows. - updated qpid-stat and qpid-cluster to filter on shadow property. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@907123 13f79535-47bb-0310-9956-ffa450edef68
* Synchronize management agent lists during cluster update.Alan Conway2010-02-051-1/+9
| | | | | | | | | - replicate management agent lists during cluster update. - suppress management agent output during update. - on join all members force full output at next periodic processing. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@907030 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: debug snapshots of queue depth at broker join, help find ↵Alan Conway2010-02-021-0/+5
| | | | | | inconsistencies. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@905674 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2357 Broker boot sequence doesn't synchronize when clustered - patch ↵Alan Conway2010-01-281-0/+14
| | | | | | from John Dunning git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904270 13f79535-47bb-0310-9956-ffa450edef68
* Fix for QPID-2373 - Durable exchange state not replicated to broker joining ↵Kim van der Riet2010-01-281-0/+3
| | | | | | cluster git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@904154 13f79535-47bb-0310-9956-ffa450edef68
* In clustered broker: move construction of broker::Connections to the cluster ↵Alan Conway2010-01-271-35/+63
| | | | | | | | | | dispatch thread. Constructing a connection can involve sending management information so needs to be in the cluster dispatch context. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903864 13f79535-47bb-0310-9956-ffa450edef68
* Removed dead code - cluster::Connection::left()Alan Conway2010-01-191-6/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@900860 13f79535-47bb-0310-9956-ffa450edef68
* Fix broker crash "confirmed N but only sent M" with managed agents running.Alan Conway2010-01-111-0/+10
| | | | | | | | | | | | | | The broker's ManagementAgent caches schemas from managed agents. This cache was not being replicated to new cluster members. If an agent such as sesame was running and connected to a newly-joined broker, that broker could send schema request messages which were not sent by other brokers that had the schema in cache. This resulted in the other brokers exiting with a "confirmed N but only sent M" message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@897955 13f79535-47bb-0310-9956-ffa450edef68
* Added config-seq counter to track config changes since cluster init.Alan Conway2010-01-061-2/+5
| | | | | | | | 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
* QPID-2296: Cluster errors when using acquire-mode-not-acquiredAlan Conway2009-12-221-1/+2
| | | | | | | Replicate consumer's queue position to new cluster nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@893175 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1899: Applied patch from Ken Giusti to tie in SASL enctryption to the ↵Gordon Sim2009-11-091-3/+5
| | | | | | handling of the --require-encrypted option git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834108 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2191: Fix browsing behaviour where messages may have been released out ↵Gordon Sim2009-11-091-0/+1
| | | | | | of order git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@834026 13f79535-47bb-0310-9956-ffa450edef68
* Fix QPID-2086, hang of federated_cluster_test_with_node_failure.Alan Conway2009-09-091-1/+9
| | | | | | | cluster::Connection did not give read credit if there was an exception processing a frame. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@813100 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
* Provide more informative cluster logging at notice levelAlan Conway2009-07-291-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@799124 13f79535-47bb-0310-9956-ffa450edef68
* Add "[shadow]" prefix to the log-ID for shadow and catch-up connections, to ↵Alan Conway2009-07-171-6/+12
| | | | | | make them easy to identify. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@795223 13f79535-47bb-0310-9956-ffa450edef68
* Update queue listeners in the correct order.Alan Conway2009-07-161-16/+23
| | | | 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-3/+3
| | | | 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-4/+10
| | | | | | | | | | | 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-16/+1
| | | | | | | | | | | | | | | | 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/+16
| | | | | | | | | 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
* Handle invalid AMPQ data to a cluster by closing the offending connection.Alan Conway2009-06-171-0/+6
| | | | | | | Prior to this fix, invalid data shut down the whole cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@785788 13f79535-47bb-0310-9956-ffa450edef68
* Performance improvements in AggregateOutput and SemanticState.Alan Conway2009-06-161-1/+15
| | | | | | | | | | | | | | 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
* Add flag to broker Connection so that it knows if it is aAndrew Stitcher2009-06-111-0/+1
| | | | | | | local or shadow connection git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783789 13f79535-47bb-0310-9956-ffa450edef68
* Further fix to new cluster member state transfer to fix a case where unacked ↵Gordon Sim2009-06-051-1/+2
| | | | | | 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
* Ensure that ring queue behaves as expected when replicated to newly joined ↵Gordon Sim2009-06-031-0/+1
| | | | | | | | | | cluster node. Altered queueDurabilityPropagationToNewbie test to not use in-process broker to fix error caused by linking change. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@781454 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1488: Ensure policy state (+ store state & mgmt stats) are accurate on ↵Gordon Sim2009-05-271-7/+4
| | | | | | | | | | | | | | 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
* Improved doOutput algorithm.Alan Conway2009-05-261-9/+2
| | | | | | | | | Simpler & more robust algorithm based on message count rather than byte size. Self-tuning, removes 2 hard-to-explain cluster options. Similar or marginally better performance. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@778896 13f79535-47bb-0310-9956-ffa450edef68
* Remove useless qpid/shared_ptr.h wrapper.Alan Conway2009-05-061-8/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@772294 13f79535-47bb-0310-9956-ffa450edef68
* Improved & simplified cluster output algorithm.Alan Conway2009-04-291-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@769914 13f79535-47bb-0310-9956-ffa450edef68
* Cleaned up some un-necessary #include dependencies.Alan Conway2009-04-151-2/+0
| | | | | | | Removed un-used LatencyMetric hack. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@765285 13f79535-47bb-0310-9956-ffa450edef68
* Fix issues when cluster is run with persistence enabled.Alan Conway2009-04-111-15/+36
| | | | | | | | | | - 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-2/+6
| | | | 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-27/+6
| | | | | | | | 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: fix delivery-property.exchange-name set on updated messages.Alan Conway2009-03-051-2/+3
| | | | | | | | | 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-20/+45
| | | | | | | | | | | | 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
* Fixed issue with producer flow control in a cluster.Alan Conway2009-02-241-4/+18
| | | | | | | | | | | | | | | | | | Producer flow control uses a Timer and other clock-based calculations to send flow control commands. These commands are not predictably ordered from the clusters point of view. Added getClusterOrderProxy() to SessionState. In a cluster it returns a proxy that defers sending a command to the client until it is multicast to the cluster. In a stand alone broker it is just the normal proxy. Updated producer flow control to use this proxy. Cluster flow control is turned off in shadow connections. Only the directly connected node does flow control calculations and multicasts the commands to send. All nodes sending of the commands thru SessionState to ensure consistent session state (e.g. command numbering.) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@747528 13f79535-47bb-0310-9956-ffa450edef68
* Cluster security support:Alan Conway2009-02-121-1/+2
| | | | | | | | - Set correct user ID on update connections. - Allow configuration of user, pass and mechanism used for update connections. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743839 13f79535-47bb-0310-9956-ffa450edef68
* Fix race condition with read-credit.Alan Conway2009-02-111-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743416 13f79535-47bb-0310-9956-ffa450edef68
* Fix memory leak in cluster code.Alan Conway2009-02-111-4/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743346 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster flow control bug: hang with large messages (>frame-max) and low ↵Alan Conway2009-02-101-2/+2
| | | | | | --cluster-read-max. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@743114 13f79535-47bb-0310-9956-ffa450edef68
* Cluster support for message time-to-live.Alan Conway2009-02-091-6/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@742774 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1618 from Mick Goulish: brokers joining cluster store persistent ↵Alan Conway2009-02-051-0/+5
| | | | | | messages that have been sent but not acknowledged. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@741123 13f79535-47bb-0310-9956-ffa450edef68
* Fix assertion due to doOutput control being sent after local connection closed.Alan Conway2009-02-041-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740872 13f79535-47bb-0310-9956-ffa450edef68
* Fix for race conditions in cluster join.Alan Conway2009-02-031-25/+8
| | | | | | | | | - ConnectionDecoder: separated from Connection. - cluster/PollableQueue: stop processing frames if PollableQueue is stopped. - move state checks in event-queue handler to frame-queue handler. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740459 13f79535-47bb-0310-9956-ffa450edef68
* cluster/EventFrame.cpp: Add operator<< for EventFrameAlan Conway2009-01-271-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@738107 13f79535-47bb-0310-9956-ffa450edef68