summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
Commit message (Collapse)AuthorAgeFilesLines
* QPID-6118: Add qmf shutdown command to the brokerAlan Conway2014-09-262-1/+8
| | | | | | | | QMF shutdown command implemented on broker. - ACL to control shutdown: acl deny all access method name=shutdown - Added "qpid-config shutdown" command to shut down the broker. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1627811 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6123: allow for change in engine API introduced in 0.8Gordon Sim2014-09-262-12/+48
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1627809 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA Remove dead code in ReplicatingSubscription.Alan Conway2014-09-221-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1626882 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6112: Incoming QMF objects dont update transfers counterPavel Moravec2014-09-221-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1626808 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5590: handle unknown exchange type for topic policyGordon Sim2014-09-193-4/+29
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1626206 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5361: No tests for linearstore functionality currently exist - basic ↵Kim van der Riet2014-09-161-1/+4
| | | | | | tests from the legacystore suite ported to linearstore git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1625283 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6087: QMF Session name to contain user ID for AMQP 0-10Pavel Moravec2014-09-121-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1624473 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6089: Need to register transports with the Url parser.Andrew Stitcher2014-09-091-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1623882 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5033: Bad buffer accounting leading to spurious SSL errors on WindowsClifford Jansen2014-09-095-217/+338
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1623614 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA Fix ha_tests.py failures with SWIG 0.10 client.Alan Conway2014-09-054-6/+28
| | | | | | | | - Fix un-necessary re-sends in amqp0_10::SenderImpl::replay. - Throw NotFound and UnauthorizedAccess correctly from amqp0_10::SessionImpl and ConnectionImpl - Fix ha_test wait_address and valid_address re-using a session after it is closed by NotFound. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1622592 13f79535-47bb-0310-9956-ffa450edef68
* [AMQP 1.0] tcp-nodelay not supported yet on 1.0 connectionsAlan Conway2014-09-042-0/+3
| | | | | | Fixed. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1622507 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6069: FreeBSD compilation problemsAndrew Stitcher2014-09-031-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1622369 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5855: Fix to JAVA Client Can not recieve message with qpid ha cluster.Alan Conway2014-08-294-8/+14
| | | | | | | | | | | | | | The original fix for this introduced a regression, running the qpid-txttest2 test against a cluster with the linear store failed. This fixes the fix. - Run transaction commit logic when the commit completes. Report completion to the user only when all prior commands have completed (sync point) - Fix missing initializer in client/amqp0_10/SessionImpl.cpp for transaction committing flag. - Remove annoying log messages from IdSetter.h - Skip transactional messages in prepare, don't wait till commit. - Added fetch-timeout option to qpid-txtest2 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1621368 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5975: HA extra/missing messages when running qpid-txtest2 in a loop ↵Alan Conway2014-08-283-31/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with failover. This is partly not-a-bug, there is a client error handling issue that has been corrected. qpid-txtest2 initializes a queue with messages at the start and drains the queues at the end. These operations are *not transactional*. Therefore duplicates are expected if there is a failover during initialization or draining. When duplicates were observed, there was indeed a failover at one of these times. Making these operations transactional is not enough to pass, now we see the test fail with "no messages to fetch". This is explained as follows: If there is a failover during a transaction, TransactionAborted is raised. The client assumes the transaction was rolled back and re-plays it. However, if the failover occurs at a critical point *after* the client has sent commit but *before* it has received a response, then the the client *does not know* whether the transaction was committed or rolled-back on the new primary. Re-playing in this case can duplicate the transaction. Each transaction moves messages from one queue to another so as long as transactions are atomic the total number of messages will not change. However, if transactions are duplicated, a transactional session may try to move more messages than exist on the queue, hence "no messages to fetch". For example if thread 1 moves N messages from q1 to q2, and thread 2 tries to move N+M messages back, then thread 2 will fail. This problem has been corrected as follows: C++ and python clients now raise the following exceptions: - TransactionAborted: The transaction has definitely been rolled back due to a connection failure before commit or a broker error (e.g. a store error) during commit. It can safely be replayed. - TransactionUnknown: The transaction outcome is unknown because the connection failed at the critical time. There's no simple automatic way to know what happened without examining the state of the broker queues. Unfortunately With this fix qpid-txtest2 is no longer useful test for TX failover because it regularly raises TransactionUnknown and there's not much we can do with that. A better test of TX atomicity with failover is to run a pair of qpid-send/qpid-receive with fail-over and verify that the number of enqueues/dequeues and message depth are a multiple of the transaction size. See the JIRA for such a test. (Note these test also sometimes raise TransactionUnknown but it doesn't matter since all we are checking is that messages go on and off the queues in multiple of the TX size.) ) Note: the original bug also reported seeing missing messages from qpid-txtest2. I don't have a good explanation for that but since the qpid-send/receive test shows that transactions are atomic I am going to let that go for now. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1621211 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6049: ensure nss is initialised (and shutdown) for 1.0 connections; add ↵Gordon Sim2014-08-273-0/+47
| | | | | | 1.0 based ssl test git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1620948 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6045: adjust the reported filter to make clear that wildcard subject ↵Gordon Sim2014-08-261-1/+3
| | | | | | filtering is not supported with xml exchange git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1620630 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6043: Add a configuration option to overwrite files returned to the EFPKim van der Riet2014-08-259-41/+79
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1620426 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6021: prevent protons internal output buffer growing too largeGordon Sim2014-08-222-1/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619951 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5855: JAVA Client Can not recieve message with qpid ha cluster "Session ↵Alan Conway2014-08-226-20/+52
| | | | | | | | | | | | | | | | | | | exception occured while trying to commit" The problem: the java client sets the sync flag on tx.commit and then waits for completion of the entire transaction. According to the 0-10 spec, this is correct, the commit (or rollback) will not complete until all of the transactional commands have completed. However the C++ broker was sometimes completing a commit *before* one of the the corresponding enqueues. It issued the completions up to the commit (because the commit is makred sync) but there is a "hole" for the incomplete enqueue. The enqueue is not marked sync so when this hole is filled no completion is sent and the client hangs. Fix: make tx.commit a "sync point", that is it behaves like execution.sync and is not completed till all preceeding commands are complete. Note tx.rollback does not need modification as it is never completed asynchronously. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619816 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: remove redundant and confusing statement; the record is already ↵Gordon Sim2014-08-221-1/+0
| | | | | | marked ended and this invocation is on the copy that is not stored anyway git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619746 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6032: throw aborted error before reconnect attempt when a transactional ↵Gordon Sim2014-08-221-0/+1
| | | | | | session discovers transport failure git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619745 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6020: HA logging improvements - log prefix with status and ID.Alan Conway2014-08-214-6/+6
| | | | | | | Fix log prefix for RemoteBackup and PrimaryTxObserver objects. Use short UUIDs for showing UUID sets in logs. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619581 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Reduce "No EFP Partition" log message from warning to info.Alan Conway2014-08-211-2/+2
| | | | | | | It is normal for there to be no EFP partition if a broker is being started for the first time with a clean data directory. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619580 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6021: fix compile error on windowsGordon Sim2014-08-212-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619318 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6021: better batchingGordon Sim2014-08-204-68/+85
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619252 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6020: HA logging improvements - log prefix with status and ID.Alan Conway2014-08-1936-192/+355
| | | | | | | | | | | | | | | | | Include broker status and ID in (almost) all logging messages. Makes it much easier to track broker state and interactions. Sundry other logging improvements including: - Demote noisy messages to trace - connections from rgmanager status checks, searching for primary. - Rationalise start-up messages. - Improved queue state detail replicating subscription and queue guard initialization. - Fail to prepare TX is error. - Collect all primary TX errors into one. - Fix status of catchup brokers in primary membership for logging. - Add process name/PID info to client connection messages. - Various minor message tweaks. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1619003 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6021: avoid waking up the io thread unnecessarily, improves receive ↵Gordon Sim2014-08-193-2/+18
| | | | | | rate a bit git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1618914 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6021: increase initial credit granted to producersGordon Sim2014-08-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1618913 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6015: HA Python QMF console raises exception due to HA subscriptions.Alan Conway2014-08-181-1/+4
| | | | | | | | | | One of the arguments in a HA subscription (qpid.ha-ids) is binary encoded data, however it was being passed as a string type in the arguments map. This caused python qmf console clients to choke when they tried to utf-decode the data. Fix is to pass the data using the vbin32 type which is intended for binary data. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1618712 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA documentation improvements.Alan Conway2014-08-151-1/+1
| | | | | | | | | | | The broker options link-maintenance-interval and link-heartbeat-interval were documented only in the HA section and not in the federation section which created confusion about whether they affected HA links only or user federation links as well. Added documentation to the federation section and an explicit mention in the HA section that it uses federation links. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1618160 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: HA Account for TX primary replication queues as HA user.Alan Conway2014-08-151-2/+7
| | | | | | Previously they were not accounted which caused ACL notice messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1618133 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5999: Update selector syntax documentation to reflect the implementationAndrew Stitcher2014-08-141-18/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617999 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5985: fixed regression introduced by previous commit (r1617256), ↵Gordon Sim2014-08-141-0/+1
| | | | | | ensuring that call does not block indefinitely git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617924 13f79535-47bb-0310-9956-ffa450edef68
* [no jira]: fixing commit 1617841 that broke building (unreliable to be ↵Pavel Moravec2014-08-141-2/+1
| | | | | | initialized after nextId) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617897 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5995: Initialize messaging SenderContext delivery tagCharles E. Rolke2014-08-131-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617841 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Updated ISSUES fileKim van der Riet2014-08-121-2/+15
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617476 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Clean up excessive "notice" level log messages, add ↵Alan Conway2014-08-116-18/+30
| | | | | | | | | | start-up/shut-down messages. - Demote excessive "notice" level log messages to "info" - Provide clear notice "start-up/shut-down" messages at start and end of broker log. - Log broker PID in start-up/shut-down messages. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617293 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5985: check for incoming messages - without waiting - even when timout is 0Gordon Sim2014-08-111-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1617256 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5966: HA mixing tx enqueue and non-tx dequeue leaves extra messages on ↵Alan Conway2014-08-0814-76/+152
| | | | | | | | | | | | | | | | | | | | | backup. There were several problems: 1. Positions of transactionally enqueued messages not known to QueueReplicator, so not dequeued on backup if dequeued outside a TX on primary. 2. Race condition if tx created immediately after queue could cause duplication of TX message. 3. Replication IDs were not being set during recovery from store (regression, store change?) Fix: 1. Update positions QueueReplicator positions via QueueObserver::enqueued to see all enqueues. 2. Check for duplicate replication-ids on backup in QueueReplicator::route. 3. Set replication-id in publish() if not already set in record(). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1616704 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5974: HA qpid-txtest2 can bring down a cluster (JERR_MAP_LOCKED))Alan Conway2014-08-086-29/+61
| | | | | | | | | | | Problem: transactional dequeues can be sent via two paths as part of the transaction and via the normal queue replication. If journal is involved this can result result in store errors if the normal replication path attempts to dequeue before the transaction. Solution: this is also the case for enqueues, and we already have code in place to skip replication of tx enqueues via the normal route. Copied the same logic for dequeues. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1616703 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5973: HA cluster state may get stuck in recoveringAlan Conway2014-08-084-2/+23
| | | | | | | | | | | | | | | | | | | | | | A backup queue is considered "ready" when all messages up to the first guarded position have either been replicated and acknowledged or dequeued. Previously this was implemented by waiting for the replicationg subscription to advance to the first guarded position and wating for all expected acks. However if messages are dequeued out-of-order (which happens with transactions) there can be a gap at the tail of the queue. The replicating subscription will not advance past this gap because it only advances when there are messages to consume. This resulted in backups stuck in catch-up. The recovering primary has a time-out for backups that never re-connect, but if they connect sucessfully and don't disconnect, the primary assumes they will become ready and waits - causing the primary to be stuck in "recovering". The fixes is to notify a replicating subscription if it becomes "stopped" because there are no more messages available on the queue. This implies that either it is at the tail OR there are no more messags until the tail. Either way we should consider this "ready" from the point of view of HA catch-up. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1616702 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5948: prevent creation of durable topic backed by non-durable exchange; ↵Gordon Sim2014-08-062-1/+7
| | | | | | | | add exception handling to object recovery. (Based on patch from Kim van der Riet). git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1616287 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5963: fix from Chris Richardson to prevent broker incorrecctly thinking ↵Gordon Sim2014-08-051-1/+1
| | | | | | it has decoded protocol header when it has not git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1615991 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5959: allow content encoding to be readGordon Sim2014-08-041-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1615699 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5942: qpid HA cluster may end-up in joining state after HA primary is ↵Alan Conway2014-07-313-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | killed There are two issues here, both related to the fact that rgmanager sees qpidd and qpidd-primary as two separate services. 1. The service start/stop scripts can be called concurrently. This can lead to running a qpidd process who's pid is not in the pidfile. rgmanager cannot detect or kill this qpidd and cannot start another qpidd because of the lock on the qpidd data directory. 2. rgmanager sees a primary failure as two failures: qpidd and qpidd-primary, and will then try to stop and start both services. The order of these actions is not defined and can lead to rgmanager killing a service it has just started. This patch makes two major changes to the init scripts: 1. Uses flock to lock the sensitive stop/start part of the scripts to ensure they are not executed concurrently. 2. On "stop" the scripts check if a running qpidd is primary or not. "qpidd stop" is a no-op if the running broker is primary, "qpidd-primary stop" is a no op if it is not. This ensures that a broker will be stopped by the same stream of service actions that started it. Minor changes in this patch: - better logging of broker start-up and shut-down sequence. - qpid-ha heartbeat use half of timeout option. - add missing timeouts in qpid-ha. Notes: This changes the behavior of 'clusvcadm -d <qpidd-service>' on the primary node. Previously this would have stopped the qpidd service on that node, killed the qpidd process and relocated the primary service. Now this will stop the qpidd service (as far as rgmanager is concerned) but will not kill qpidd or relocate the primary service. When the primary is relocated the qpidd service wil not be able to re-start on that node until it is re-enabled with 'clusvcadm -e'. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1614895 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5924 [linearstore] Qpidd Will Not Start with Large Number of QueuesKim van der Riet2014-07-305-1/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1614665 13f79535-47bb-0310-9956-ffa450edef68
* [QPID-5929]: Mark deprecated QMF fields as Deprecated and do some relevant ↵Pavel Moravec2014-07-2911-90/+40
| | | | | | code cleanup git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1614301 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5890: Validation refactoring. Fix Coverity MIXED_ENUM complaint.Charles E. Rolke2014-07-281-4/+48
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1614031 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4123: C++ Broker ACL creates too many rulesCharles E. Rolke2014-07-2312-217/+568
| | | | | | | | | | | | | | | | | | | | | | | Recent changes have added new tables to define what are ACL lookups and their properties. This commit finishes that work by not propagating rules that will never match. Also, it completes the scaffolding for allowed and denied host lists to be fully integrated. This commit: * Adds startup logging of ACL validation tables with cross references to possible rule matches. * Hooks the ACL host allow/deny connection lists into self test. * Fixes self tests that get broken by proper rule table handling. * Introduces a 'create connection' decision mode similar to ACL rule decision mode. * Describes it all in doc book. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1612874 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5815Michael Goulish2014-07-231-0/+5
| | | | | | | Checkin for Irina Boverman. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1612838 13f79535-47bb-0310-9956-ffa450edef68