summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/cluster_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* NO-JIRA: Remove obsolete cluster_test.cpp test.Alan Conway2013-09-031-1231/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1519806 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA TX transactions: basic replication.Alan Conway2013-08-011-0/+1231
| | | | | | | | | | | | | | | On primary a PrimaryTxObserver observes a transaction's TxBuffer and generates transaction events on a tx-replication-queue. On the backup a TxReplicator receives the events and constructs a TxBuffer equivalent to the one in the primary. Unfinished: - Primary does not wait for backups to prepare() before committing. - All connected backups are assumed to be in the transaction, there are race conditions around brokers joining/leavinv where this assumption is invalid. - Need more tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509423 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4514: Remove obsolete cluster code: cleanup testsAlan Conway2012-12-191-1231/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1424139 13f79535-47bb-0310-9956-ffa450edef68
* QPID-529: Priority queue implementationGordon Sim2011-02-101-0/+36
| | | | | | | | | | QPID-2104: LVQ enhancement These both required some refactoring of the Queue class to allow cleaner implementation of different types of behaviour. The in-memory storage of messages is now abstracted out behind an interface specified by qpid::broker::Messages which qpid::broker::Queue uses. Different implementations of that are available for the standard FIFO queue, priority queues and LVQ (I have also separated out the 'legacy' implementation of LVQ from the new version driven by QPID-2104). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1069322 13f79535-47bb-0310-9956-ffa450edef68
* Fix test bug causing occasional failure of cluster_test.Alan Conway2010-06-241-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@957639 13f79535-47bb-0310-9956-ffa450edef68
* Cluster handle connection-negotiation phase in local broker.Alan Conway2010-06-081-4/+4
| | | | | | | | | | | | | | | | | The connection negotiation phase up to the "open" or "open-ok" frame establishes whether/what encryption to use for the rest of the connection. With this patch a cluster broker completes the initial negotiation with its local clients and only then begins multicasting to other brokers. The local broker decrypts if necessary and multicasts in the clear. This replaces a problematic locking scheme that was formerly in place which caused deadlocks. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@952692 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2631: For blocking Bounds::expand() calls, only increase the current ↵Gordon Sim2010-05-271-0/+2
| | | | | | count when there is space. In SessionImpl::send() expand bounds before queueing frame. Expand bounds for all frames sent (including connection frames and cluster specific frames). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@948936 13f79535-47bb-0310-9956-ffa450edef68
* Cluster + SecurityMichael Goulish2010-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ----------------------------------- * initial observation of a problem was a 2% failure rate in perftests of 20,000 messages against a cluster with security enabled. Problem was occasional receit of encrypted frames before the security codec had been enabled. This is fixed with locking in cluster code (no new locks in broker code) and a callback that is fired by broker::ConnectionHandler::Handler to tell the cluster code when the opening handshake has finished. This was never a problem in the non-clustered broker before because everything happened in a single thread. * the brokers that "shadow" the connection must not have null authenticators rather than real ones, so that they go through all the motions but don't do anythig. Only the directly-connected broker can perform the security handshake. * once the directly-connected broker receives the real user ID from its callback, it mcasts that ID to all other brokers. Otherwise the shadowing brokers will al think that the user ID is "anonymous". Check this by doing a substantial perftest, and using qpid-stat -c localhost:PORT to confirm that the brokers all have the same userID for the same connection. * the user ID, negotiated during the Sasl security startup, is communicated from the directly connected broker to all other cluster brokers. * If security is *not* being used, then this code should *not* tell the brokers anything about the userID -- or it will step on the value that is being set by other code pathways. * test program at cpp/src/tests/cluster_authentication_soak is not yet fully automated -- run it with something like "sudo ./cluster_authentication_soak 500" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@944158 13f79535-47bb-0310-9956-ffa450edef68
* Use UnauthorizedAccessException for ACL violations rather than ↵Gordon Sim2010-05-061-2/+2
| | | | | | NotAllowedException git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@941636 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: remove un-necessary code for config-seq.Alan Conway2010-03-311-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@929616 13f79535-47bb-0310-9956-ffa450edef68
* Cluster: fix update of failover exchange.Alan Conway2010-02-021-1/+1
| | | | | | | During update the cluster was sending an extra update to the failover exchange. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@905676 13f79535-47bb-0310-9956-ffa450edef68
* Fix intermittent test error: cluster_test.cpp(1108): error in "testRelease": ↵Alan Conway2010-01-191-0/+1
| | | | | | | | | | | | | | | | check browse(c3, "q", 5) == expected failed [ != m_1 m_2 m_3 m_4 m_5 ] This was a test issue, not a broker issue. What seems to have been happening: - start broker b0 & send messages. - fork broker b1 - line 1103 (lqSub.release(...)); executes against b0 _before_ b1 connects for update lqSub.release(lqSub.getUnaccepted()); - line 1108 browse() executes during the update. - update takes > 0.5 secs for some reason, browse times out. The fix is a synchronous flush in browse() which will wait for the broker to be responsive before trying to get the messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@900829 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2296: Cluster errors when using acquire-mode-not-acquiredAlan Conway2009-12-221-0/+37
| | | | | | | Replicate consumer's queue position to new cluster nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@893175 13f79535-47bb-0310-9956-ffa450edef68
* Clean up test environment variables, prepare for running more tests in cmake.Alan Conway2009-11-301-2/+2
| | | | | | | | | - consolidate test env vars in test_env.sh, also useful from command line. - generate test_env.sh with autoconf/cmake to cover library location differences. - Remove explicit mention of .libs, use $QPID_MODULE_DIR to load modules. - Fix run_test to run valgrind under cmake git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@885557 13f79535-47bb-0310-9956-ffa450edef68
* Changes to hopefully address a sporadic test failure. Couldn't reproduce so ↵Alan Conway2009-11-201-8/+5
| | | | | | not sure. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@882598 13f79535-47bb-0310-9956-ffa450edef68
* cluster::InitialStatusMap and unit tests, support for improved cluster join ↵Alan Conway2009-11-171-5/+0
| | | | | | protocol. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@881420 13f79535-47bb-0310-9956-ffa450edef68
* Fix leak in SASL code, enable cluster ACL test.Alan Conway2009-11-021-8/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@832134 13f79535-47bb-0310-9956-ffa450edef68
* Separate FailoverListener from client::Connection.Alan Conway2009-10-261-4/+9
| | | | | | | | | | | | | | | | | | client::ConnectionImpl used to contain a FailoverListener to subscribe for updates on the amq.failover exchange. This caused some lifecycle issues including memory leaks. Now FailoverListener is a public API class that the user must create associated with a session to get known-broker updates. Removed the weak_ptr logic in client::SessionImpl which was only required because of FailoverListener. Made SessionImpl::close() idempotent. Gets rid of spurious warning messages in some tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@829931 13f79535-47bb-0310-9956-ffa450edef68
* Fix race condition in testExclusiveQueueUpdate causing occasional false ↵Alan Conway2009-10-081-0/+1
| | | | | | failures. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@823213 13f79535-47bb-0310-9956-ffa450edef68
* Fixed: cluster udpate did not presever deliver-properties.exchange on messages.Alan Conway2009-10-051-4/+54
| | | | | | | | Also minor improvements: - Improved debug logging for consumers. - Cluster tests scripts work with latest corosync: don't check/set ais group. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@821830 13f79535-47bb-0310-9956-ffa450edef68
* Tidied up namespace usageAndrew Stitcher2009-09-091-2/+7
| | | | | | Miscelleneous whitespace fixes git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@813094 13f79535-47bb-0310-9956-ffa450edef68
* Remove incorrect directory from #includeAlan Conway2009-07-141-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793912 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@793909 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1974: Fixes (and tests) for updating lvq state to new cluster members.Gordon Sim2009-07-081-2/+63
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@792103 13f79535-47bb-0310-9956-ffa450edef68
* Fix for cluster_test problems: a) When not started from within test dir, ↵Kim van der Riet2009-07-011-90/+100
| | | | | | qpidd is not found, and a process cascade results in which each forked process continues and runs all tests after its own instead of terminating; b) Hard-coded paths and names of libs, which have been moved into Makefile.am; c) Some tests use ScopedSuppressLogging, these tests are modified so the scope of the logging suppression does not include the broker/cluster startup. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@790215 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster race condition with connections closed by broker while in use.Alan Conway2009-06-301-5/+12
| | | | | | | | | | | | | | | | 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@789947 13f79535-47bb-0310-9956-ffa450edef68
* Handle invalid AMPQ data to a cluster by closing the offending connection.Alan Conway2009-06-171-2/+42
| | | | | | | Prior to this fix, invalid data shut down the whole cluster. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@785788 13f79535-47bb-0310-9956-ffa450edef68
* Drop _EXPECTED_FAILURES macro, doesn't work with all boost versions.Alan Conway2009-06-171-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@785601 13f79535-47bb-0310-9956-ffa450edef68
* Updates to python cluster tests and associated scriptsKim van der Riet2009-06-101-7/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@783451 13f79535-47bb-0310-9956-ffa450edef68
* Further fix to new cluster member state transfer to fix a case where unacked ↵Gordon Sim2009-06-051-20/+67
| | | | | | messages on ring policy queue cause inconsistencies in queue state between nodes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@782075 13f79535-47bb-0310-9956-ffa450edef68
* Ensure that ring queue behaves as expected when replicated to newly joined ↵Gordon Sim2009-06-031-1/+78
| | | | | | | | | | 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@781454 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1873: Further test case contributed by Mick Goulish.Gordon Sim2009-05-271-0/+25
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@779241 13f79535-47bb-0310-9956-ffa450edef68
* Fixed erroneous use of arg::durable in messageTransfer()Kim van der Riet2009-05-271-43/+50
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@779205 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1488: Ensure policy state (+ store state & mgmt stats) are accurate on ↵Gordon Sim2009-05-271-0/+52
| | | | | | | | | | | | | | 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@779183 13f79535-47bb-0310-9956-ffa450edef68
* Changed name of store switch environment variableKim van der Riet2009-05-051-24/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@771943 13f79535-47bb-0310-9956-ffa450edef68
* Cluster test code now has a persistence switch controlled by the ↵Kim van der Riet2009-05-011-84/+130
| | | | | | environment. When this switch set, all brokers start with the store module loaded, all queues are declared persistent and all messages are also made persistent. The absolute paths to module libs hardcoded into the test fixtures have been replaced by paths relative to environment variable QPID_LIB_DIR (which is set in Makefile.am). The cluster test, when run from qpid, will continue to run without persistence by default; the intention is to have the store test code run this test directly with the switch turned on. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@770796 13f79535-47bb-0310-9956-ffa450edef68
* Apply PIMPL pattern to qpid::client::Message.Alan Conway2009-04-201-0/+1
| | | | | | | Hide implementation of Message, move framing::MethodContent and framing::TransferContent out of public API. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@766899 13f79535-47bb-0310-9956-ffa450edef68
* Fix issues when cluster is run with persistence enabled.Alan Conway2009-04-111-24/+6
| | | | | | | | | | - 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@764204 13f79535-47bb-0310-9956-ffa450edef68
* Added cluster ACL test, disabled for now as it exposes a memory leak in the ↵Alan Conway2009-03-101-35/+48
| | | | | | SASL client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@752154 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster TTL: replicte expiry information to newcomers.Alan Conway2009-03-091-3/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@751760 13f79535-47bb-0310-9956-ffa450edef68
* cluster: fix delivery-property.exchange-name set on updated messages.Alan Conway2009-03-051-1/+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@750456 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1705: added unit test for heartbeat firing after connection has failed overGordon Sim2009-03-021-0/+85
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@749313 13f79535-47bb-0310-9956-ffa450edef68
* Cluster security support:Alan Conway2009-02-121-9/+49
| | | | | | | | - 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@743839 13f79535-47bb-0310-9956-ffa450edef68
* Cluster support for message time-to-live.Alan Conway2009-02-091-42/+83
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@742774 13f79535-47bb-0310-9956-ffa450edef68
* Fix doubly-defined function.Alan Conway2009-02-091-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@742602 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1650 Mick Goulish: separte ClusterFixture from cluster_test.cpp for use ↵Alan Conway2009-02-061-81/+1
| | | | | | by other tests. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@741568 13f79535-47bb-0310-9956-ffa450edef68
* Fix for race conditions in cluster join.Alan Conway2009-02-031-2/+2
| | | | | | | | | - 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@740459 13f79535-47bb-0310-9956-ffa450edef68
* Cluster rename: dump -> update, newbie -> joinerAlan Conway2009-01-271-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@737971 13f79535-47bb-0310-9956-ffa450edef68
* Separate cluster::EventHeader to allow non-copy events.Alan Conway2009-01-161-11/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@735059 13f79535-47bb-0310-9956-ffa450edef68
* Cluster.cpp: Fixed last-node-standing logic, better logging.Alan Conway2008-11-261-0/+1
| | | | | | | Shlib.cpp: added file name to errors messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@720924 13f79535-47bb-0310-9956-ffa450edef68