<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/qpid-python.git/cpp/include/qpid/messaging/Session.h, branch QPID-6125-ProtocolRefactoring</title>
<subtitle>git.apache.org: qpid.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/'/>
<entry>
<title>QPID-5975: HA extra/missing messages when running qpid-txtest2 in a loop with failover.</title>
<updated>2014-08-28T21:47:44+00:00</updated>
<author>
<name>Alan Conway</name>
<email>aconway@apache.org</email>
</author>
<published>2014-08-28T21:47:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=b93b20dd123757b208f9e78ef778e3648c3438a0'/>
<id>b93b20dd123757b208f9e78ef778e3648c3438a0</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>NO-JIRA - Fixed a minor typo in the doc text.</title>
<updated>2011-12-20T13:23:45+00:00</updated>
<author>
<name>Ted Ross</name>
<email>tross@apache.org</email>
</author>
<published>2011-12-20T13:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=b66b9dede8f28e9f169e655bc96ed08302946812'/>
<id>b66b9dede8f28e9f169e655bc96ed08302946812</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1221249 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1221249 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>NO-JIRA: Additional doxygen comments for exceptions</title>
<updated>2011-09-05T19:00:23+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2011-09-05T19:00:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=565a0423fb823c4bcef493a35706f619a7825012'/>
<id>565a0423fb823c4bcef493a35706f619a7825012</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1165391 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1165391 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-3200: Add new method to session for cumulative acknowledgement upto (and including) a specified message</title>
<updated>2011-06-15T11:48:43+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2011-06-15T11:48:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=799bda76fddaaa06237a77a0be52b7fbb6b4cc36'/>
<id>799bda76fddaaa06237a77a0be52b7fbb6b4cc36</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1136003 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1136003 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-3186 - Import Export generalization to support a larger set of compilers and run time environments</title>
<updated>2011-05-17T21:02:34+00:00</updated>
<author>
<name>Ted Ross</name>
<email>tross@apache.org</email>
</author>
<published>2011-05-17T21:02:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=0d1d4426a8544cd24b3c88e26087356cabf2c034'/>
<id>0d1d4426a8544cd24b3c88e26087356cabf2c034</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1104559 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1104559 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-2998: Remove spurious class definitions</title>
<updated>2011-01-17T09:46:50+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2011-01-17T09:46:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=b09898401ededa02f463d4673fc8c612aed8d60c'/>
<id>b09898401ededa02f463d4673fc8c612aed8d60c</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1059835 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1059835 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved wording in the doxygen strings for session::reject(), session::release().</title>
<updated>2010-10-15T13:00:13+00:00</updated>
<author>
<name>Jonathan Robie</name>
<email>jonathan@apache.org</email>
</author>
<published>2010-10-15T13:00:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=95035460547a97688cc0cf46d5334b8958394a82'/>
<id>95035460547a97688cc0cf46d5334b8958394a82</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022902 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022902 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed confusing text from reject() and release() doxygen strings.</title>
<updated>2010-10-14T21:11:38+00:00</updated>
<author>
<name>Jonathan Robie</name>
<email>jonathan@apache.org</email>
</author>
<published>2010-10-14T21:11:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=5abe7e4b23b33d03d991e07bb9999c5e05fbfaaf'/>
<id>5abe7e4b23b33d03d991e07bb9999c5e05fbfaaf</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022712 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1022712 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>QPID-2807: Allow per message acknowledgement</title>
<updated>2010-08-20T11:32:11+00:00</updated>
<author>
<name>Gordon Sim</name>
<email>gsim@apache.org</email>
</author>
<published>2010-08-20T11:32:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=6b53bd87dd18304320162f827d56063a8dc4d4bf'/>
<id>6b53bd87dd18304320162f827d56063a8dc4d4bf</id>
<content type='text'>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987459 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@987459 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
<entry>
<title>Added conditional-compilation directives to hide the PrivateImplRef template</title>
<updated>2010-08-04T13:22:00+00:00</updated>
<author>
<name>Ted Ross</name>
<email>tross@apache.org</email>
</author>
<published>2010-08-04T13:22:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/qpid-python.git/commit/?id=e84a4dba7b583aa482afd9c8ef99c8a48190ce86'/>
<id>e84a4dba7b583aa482afd9c8ef99c8a48190ce86</id>
<content type='text'>
from Swig.  It seems that earlier versions of Swig (like that in RHEL5) don't like
the template syntax.


git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@982243 13f79535-47bb-0310-9956-ffa450edef68
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
from Swig.  It seems that earlier versions of Swig (like that in RHEL5) don't like
the template syntax.


git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@982243 13f79535-47bb-0310-9956-ffa450edef68
</pre>
</div>
</content>
</entry>
</feed>
