summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* QPID-4428: HA add UUID tag to avoid using an out of date queue/exchange.Alan Conway2012-11-142-3/+43
| | | | | | | | | | | | | | | | | 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
* NO-JIRA: Suppress warning errors in ha_tests.py test_qmf_replication.Alan Conway2012-11-141-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1409225 13f79535-47bb-0310-9956-ffa450edef68
* Bug 874118 - HA Deadlock in backup broker after disconnecting from primary.Alan Conway2012-11-091-8/+16
| | | | | | | | | | | The backup broker was running ExchangeRegistry::for_each to clean up connections, but this holds the ExchangeRegistry lock and hence the deadlock. Now we copy a list of exchanges with for_each and work on it without the lock. The issue showed up for 0 timeouts only because the queue schedules non-0 timeouts to a separate timer thread. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1407661 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4394: HA QMF events out of orderAlan Conway2012-11-011-0/+57
| | | | | | | | | | | | | | | | 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-4401: HA bindings for QMF exchanges not replicated.Alan Conway2012-10-311-1/+23
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1403946 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: removed all remaining traces of unused alloca.hAndrew Stitcher2012-10-241-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401831 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA - Fixed a make-dist bug by adding a missing file.Ted Ross2012-10-241-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401721 13f79535-47bb-0310-9956-ffa450edef68
* Bug:868364 - QPID-4391: HA ignore stale responses.Alan Conway2012-10-241-3/+30
| | | | | | | | | | | | | Related issue discovered while fixing this bug: The BrokerReplicater pulls management events and query responses from different queues, there is no co-ordination between them. If a response is processed late, after create and delete events, it will incorrectly re-create the deleted queue. This patch ignores responses if we have already seen an event for the queue or exchange. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401711 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4272: Large amounts of code are duplicated between the SSL and TCP ↵Andrew Stitcher2012-10-242-8/+6
| | | | | | | | | | | | | transports Lift Socket into an interface with concrete implementations - BSDSocket, WinSocket and SslSocket - As a side effect completely change the approach we use for platform specific handles: IOHandle now directly carries the platform handle but its real type is only exposed to platform specific code. - Modified RDMA code for the new IOHandle approach git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1401559 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3633: Make cmake the primary build tool for the cpp treeAndrew Stitcher2012-10-221-2/+6
| | | | | | Now install most of the test executables git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1400783 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: fix fluffed merge in r1400258Andrew Stitcher2012-10-221-4/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1400759 13f79535-47bb-0310-9956-ffa450edef68
* Bug 868360 - QPID-4379: HA does not properly handle expired messages.Alan Conway2012-10-191-0/+15
| | | | | | | The trunk is not affected by this bug, so this commit is just to add the regression test that proves it. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1400258 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4373 r139931 Fix self test to use proper switch name.Charles E. Rolke2012-10-181-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1399828 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4373 fix ambiguous CLI args; restore C++ broker schema propertyCharles E. Rolke2012-10-171-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1399311 13f79535-47bb-0310-9956-ffa450edef68
* MQPID-4286: QMF queries for HA replication take too long to process (Jason ↵Alan Conway2012-10-152-614/+563
| | | | | | | | | | Dillaman) Rework ManagementAgent locks, get rid of shared buffers that were points of contention. Minor log message improvements in ha code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1398530 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4369: HA backup brokers core dump in benchmark test.Alan Conway2012-10-121-2/+0
| | | | | | | | Was seeing core dumps with QueueReplicator::queue == 0. Caused by race conditions when calling QueueReplicator::deactivate. Renamed deactivate to destroy and call it only when the broker::Queue is destroyed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397676 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: fix tests output of priorityGordon Sim2012-10-121-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397507 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4349: Duplicate messages with alternate exchange.Alan Conway2012-10-111-0/+27
| | | | | | | This check-in is a test only, the issue was fixed as a side effect of the fix for QPID-4350. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397295 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix spelling if --link-maintenace-interval option and add ↵Alan Conway2012-10-111-1/+1
| | | | | | | | descriptive text. Also added description for --link-heartbeat-interval git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397253 13f79535-47bb-0310-9956-ffa450edef68
* Bug 860701 - QPID-4350: HA handle auto-delete queuesAlan Conway2012-10-113-9/+88
| | | | | | | Subscribed auto-delete queues are deleted by the backup. Timed auto-delete queues are deleted after the timeout. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1397243 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4360: Fix test bug: Non-ready HA broker can be incorrectly promoted to ↵Alan Conway2012-10-092-13/+17
| | | | | | | | | | | primary. Test test_delete_missing_response was failing with "cluster active, cannot promote". - Fixed test bug: "fake" primary triggered "cannot promote". - Backup: always create QueueReplicator if not already existing. - Terminology change: "initial" queues -> "catch-up" queues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1396244 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4360: Non-ready HA broker can be incorrectly promoted to primaryAlan Conway2012-10-051-0/+14
| | | | | | | | | | | | A joining broker now attempts to contact all known members of the cluster and check their status. If any brokers are in a state other than "joining" the broker will refuse to promote. This will allow rgmanager to continue to try addresses till it finds a ready brokers. Note this reqiures ha-brokers-url to be a list of all known brokers, not a virtual IP. ha-public-url can still be a VIP. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1394706 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4285: HA backups continuously disconnect / re-sync after attempting to ↵Alan Conway2012-10-021-1/+19
| | | | | | | | | | | | | replicate a deleted queue Fixes queues getting into a partially deleted state: previously when a broker was promoted, it did not clean up it's QueueReplicators. The QueueReplicators keep a shared_ptr to the Queue so this kept Queues in memory after they were destroyed. It also kept them in QMF, since the management object is unregistered in the destructor. This patch cleans up properly on promotion. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1393201 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4285: HA backups continuously disconnect / re-sync after attempting to ↵Alan Conway2012-10-022-0/+26
| | | | | | | | | | | | | | | | replicate a deleted queue. (Based on patch by Jason Dillama) This does not directly tackle the origin of the problem but extends Jasons's patch since it addresses something we had to fix anyway: "leaking" queues and exchanges. It does 2 things. 1. enabled hideDeletedError on all subscription objects used by HA This suppress the troublesome exception with a harmless no-op 2. Delete queues/exchanges missing from responses (based on Jasons patch) Fix the "leak" of queues and exchanges possible when an object replicated to a backup is deleted from the newn primary before the backup connects. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1393089 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix logging in ha_tests.pyAlan Conway2012-09-272-171/+200
| | | | | | | | | | In order to suppress unwanted warnings from certain test, the ha_test framework was actually turning off all python logging. This patch selectively turns off wanrnings in specific code regions and then restores the configured logging level. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1391232 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4325: HA Starting from persistent storeAlan Conway2012-09-255-223/+395
| | | | | | | | | | | When re-starting a persistent HA cluster, the broker that becomes primary should keep its store data while all the backup brokers should discard their store data and catch up from the primary. Backups cannot simply use their own stores because sequence numbers of stored messages will not match on all brokers. The backup erases individual queues and exchanges as the catch-up process gets to them. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1390123 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Add missing initializers on ha::BrokerInfo contstructor.Alan Conway2012-09-241-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1389542 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4322: HA sporadic failure in ha_tests Alan Conway2012-09-191-1/+1
| | | | | | | Added Queue::getRange to get range atomically, fixes races around getting the front and backup of the range as two separate operations. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1387785 13f79535-47bb-0310-9956-ffa450edef68
* qpid-4317 make browse-only x-arg string similar to othersMichael Goulish2012-09-181-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1387135 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4290: HA auto-delete queues are not deleted (Author: Andy Goldstein)Alan Conway2012-09-171-12/+18
| | | | | | | ReplicatingSubscription was being counted as a consumer and preventing auto-delete queues from being deleted. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1386672 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4223: HA Completion isn't sent when queue that has acquired but ↵Alan Conway2012-09-142-15/+41
| | | | | | | | | | | unacknowledged messages is deleted - Extended ha_test.py test_failover_send_receive to kill backup as well as primary - QueueRegistry::destroy was not calling observer. - Primary removes disconnected brokers backups and expectedBackups - Primary calls checkReady in all cases where broker is removed from expectedBackups git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1384882 13f79535-47bb-0310-9956-ffa450edef68
* Jira QPID-4142Michael Goulish2012-09-141-0/+32
| | | | | | | auto test for browse-only queues - using messaging interface git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1384851 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Removed replication_test, unused test for defunct feature.Alan Conway2012-09-116-384/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1383536 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4259, QPID-4262: HA broker can crash due to priority queue corruptionAlan Conway2012-09-101-2/+16
| | | | | | Already fixed on trunk. Comitting just the regression test. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1383093 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4268 C++ Broker Acl support for limiting on-disk store file size and countCharles E. Rolke2012-09-071-0/+282
| | | | | | | | Reviewed at https://reviews.apache.org/r/6838/ git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1382095 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4248: HA does not replicate topic binding keys to backups (Author: Andy ↵Alan Conway2012-09-061-9/+14
| | | | | | | | | Goldstein) The issue is that QMF query responses call the binding key "bindingKey" while QMF bind events call it "key", and the code was only looking for "key" git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1381728 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4249 TopicExchange binding lookup for all routing keysCharles E. Rolke2012-08-241-2/+123
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1377130 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2393 Limit number of queues per user.Charles E. Rolke2012-08-242-4/+71
| | | | | | | | | Merge work from branches/qpid-2393 This scheme works for old HA as long as cluster members run with the same --max-queues-per-user setting. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1376961 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4230 (review 6645) Username substition keywords in Acl file.Charles E. Rolke2012-08-201-0/+540
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1375195 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA Initialize variable before its use.Charles E. Rolke2012-08-151-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1373429 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4178: Mark literals as unsigned intsGordon Sim2012-08-151-8/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1373409 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4178: broker refactoringGordon Sim2012-08-1019-2053/+414
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1371676 13f79535-47bb-0310-9956-ffa450edef68
* Remove cluster (prerequisite for QPID-4178)Gordon Sim2012-08-105-232/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1371647 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA only expect READY backups in recovery.Alan Conway2012-08-071-3/+5
| | | | | | | | | | | Don't wait for un-ready backups to become ready in recover, they weren't ready before the failure so don't wait for them to become ready after a failure. Waiting for READY backups gives us equivalent safety to before the failure. Minor test & log improvements. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1370325 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4159: HA missing messages in failover test.Alan Conway2012-07-261-2/+4
| | | | | | | | | | | | Fix test_failover_send_receive showing missing messages. With this fix, ran with -DDURATION=2 overnight with no failures. - Primary, RemoteBackup: Only report "ready" once per remote backup. - HaBroker: Put membership updates under mutex. - ReplicatingSubscription: Check for backup missing messages at the front. - ha_tests.py: Added assertion to test_priority_ring, verify primary queue as expected. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1366179 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3175 - Added SSL/x.509-auth capability to Python clients and Python toolsTed Ross2012-07-262-0/+132
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1366020 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Fix typos, update comments, update log messages.Alan Conway2012-07-231-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1364806 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: fix spurious diff when comparing cluster log files.Michael Goulish2012-07-231-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1364648 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4145: HA Minor fixes to recovery Alan Conway2012-07-171-2/+3
| | | | | | | | | - Demote timed-out backups from ready to catch-up. - Don't cancel connected backups on timeout, only disconnected ones. - Don't allow promotion of a catch-up broker. - Minor logging improvement. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1362658 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3892 C++ broker add routing key wildcard support to Acl 'publish ↵Charles E. Rolke2012-07-151-1/+119
| | | | | | | | | | | | | exchange' lookups. Although this patch does not address the original issue's regex request it provides the desired functionality in a more comprehensive manner. * Acl publish exchange rules may specify routing keys using the topic exchange syntax with '*' and '#' wildcard match tokens. * Acl lookups hook in to the broker's topic exchange key match code to perform the wildcard match. * Acl rules written using the old Acl wildcard syntax (with a single trailing '*') will continue to work the same as before. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1361678 13f79535-47bb-0310-9956-ffa450edef68