diff options
| author | Alan Conway <aconway@apache.org> | 2009-06-30 20:51:38 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2009-06-30 20:51:38 +0000 |
| commit | 6b9decf55d9aa235bfbcca645501165d08b61749 (patch) | |
| tree | c0e12ed9c282485db1cf630b17588627c15c2913 /qpid/cpp/xml/cluster.xml | |
| parent | 12bbd1457fac91a32fb5ab8146309a53e5f0ef79 (diff) | |
| download | qpid-python-6b9decf55d9aa235bfbcca645501165d08b61749.tar.gz | |
Fix cluster race condition with connections closed by broker while in use.
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
Diffstat (limited to 'qpid/cpp/xml/cluster.xml')
| -rw-r--r-- | qpid/cpp/xml/cluster.xml | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/qpid/cpp/xml/cluster.xml b/qpid/cpp/xml/cluster.xml index 8b1d47e56e..d9ab6e97cb 100644 --- a/qpid/cpp/xml/cluster.xml +++ b/qpid/cpp/xml/cluster.xml @@ -48,6 +48,21 @@ <field name="id" type="uint64"/> </control> + <domain name="error-type" type="uint8" label="Types of error"> + <enum> + <choice name="none" value="0"/> + <choice name="session" value="1"/> + <choice name="connection" value="2"/> + </enum> + </domain> + + <!-- Check for error consistency across the cluster --> + <control name="error-check" code="0x14"> + <field name="type" type="error-type"/> + <field name="frame-seq" type="uint64"/> + </control> + + <control name="shutdown" code="0x20" label="Shut down entire cluster"/> </class> @@ -56,8 +71,8 @@ <class name="cluster-connection" code="0x81" label="Qpid clustering extensions."> - <!-- Abort a connection that is sending invalid data. --> - <control name="abort" code="0x1"/> + <!-- Announce a new connection --> + <control name="announce" code="0x1"/> <!-- Marks the cluster-wide point when a connection is considered closed. --> <control name="deliver-close" code="0x2"/> @@ -67,19 +82,8 @@ <field name="limit" type="uint32"/> </control> - <domain name="error-type" type="uint8" label="Types of error"> - <enum> - <choice name="none" value="0"/> - <choice name="session" value="1"/> - <choice name="connection" value="2"/> - </enum> - </domain> - - <!-- Check for error consistency across the cluster --> - <control name="error-check" code="0x4"> - <field name="type" type="error-type"/> - <field name="frame-seq" type="uint64"/> - </control> + <!-- Abort a connection that is sending invalid data. --> + <control name="abort" code="0x4"/> <!-- Update controls. Sent to a new broker in joining mode. A connection is updateed as followed: |
