summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/TransactionObserverTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QPID-5139: HA transactions block a thread, can deadlock the brokerAlan Conway2013-10-291-3/+6
| | | | | | | | | | | | | | | | | | | | | PrimaryTxObserver::prepare used to block pending responses from each backup. With concurrent transactions this can deadlock the broker: once all worker threads are blocked in prepare, responses from backups cannot be received. This commit generalizes the async completion mechanism for messages to allow async completion of arbitrary commands. It leaves the special-case code for messages undisturbed but adds a second path (starting from SessionState::handleCommand) for async completion of other commands. In particular it implements tx.commit to allow async completion. TxBuffer is now an AsyncCompletion and commitLocal() is split into - startCommit() called by SemanticState::commit() - endCommit() called when the commit command completes TxAccept no longer holds pre-computed ranges, compute fresh each time. - Avoid range iterators going out of date during a delayed commit. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536754 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5139: Make TxBuffer inherit from AsyncCompletion.Alan Conway2013-10-291-1/+1
| | | | | | Switched from shared_ptr to intrusive_ptr for TxBuffer and DtxBuffer. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536752 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Remove use of boost::make_shared, not availble on some older versions.Alan Conway2013-08-051-3/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1510596 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA Fix windows compile errors introduced by recent commits.Alan Conway2013-08-021-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509861 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4327: HA TX transactions: basic replication.Alan Conway2013-08-011-0/+1
| | | | | | | | | | | | | | | 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-4327: Added TransactionObserver interface.Alan Conway2013-08-011-0/+143
Added TransactionObserver interface, called at each point in a transaction's lifecycle. Currently only a single observer can be associated with a transaction. Added startTx, startDtx to BrokerObserver so plugins can observe transactions starting and set a TransactionObserver. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1509421 13f79535-47bb-0310-9956-ffa450edef68