Qpid
  1. Qpid
  2. QPID-3767

Federation link index becomes invalid on failover against a cluster.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.14
    • Fix Version/s: 0.17
    • Component/s: C++ Broker
    • Labels:
      None

      Description

      The Link management object that represents a connection between two federated brokers is indexed (identified) by the remote broker's host and port. If the remote broker is part of a cluster, and a failover event occurs, the host:port used by the Link object's index may no longer exist. This prevents the route from being deleted.

      For example, create a cluster of two brokers using addresses 127.0.0.1:2222 and 127.0.0.1:3333. Start a third broker, say 127.0.0.1:8888. Create a queue route from 127.0.0.1:2222 to an exchange on 127.0.0.1:8888. Kill the broker 127.0.0.1:2222. This results in a Link object that is connected to 127.0.0.1:3333, but reports 127.0.0.1:2222 as it's host.

      [kgiusti@localhost src]$ qpid-config -a 127.0.0.1:2222 add queue src
      [kgiusti@localhost src]$ qpid-config -a 127.0.0.1:8888 add exchange fanout destx
      [kgiusti@localhost src]$ qpid-config -a 127.0.0.1:8888 add queue dest
      [kgiusti@localhost src]$ qpid-config -a 127.0.0.1:8888 bind destx dest
      [kgiusti@localhost src]$ qpid-route queue add 127.0.0.1:8888 127.0.0.1:2222 destx src
      [kgiusti@localhost src]$ ../examples/messaging/spout -b 127.0.0.1:2222 --content "ZZZ" src
      [kgiusti@localhost src]$ ../examples/messaging/drain -b 127.0.0.1:8888 -t 2 dest
      Message(properties=

      {spout-id:8c308c74-6b25-4408-8694-93ef8352a308:0, x-amqp-0-10.routing-key:src}

      , content='ZZZ')

      <Kill Broker 127.0.0.1:2222, link fails over to 127.0.0.1:3333>

      From qpid-tool:

      qpid: show 133
      Object of type: org.apache.qpid.broker:link:_data(bc33c1b3-25cd-e0ce-04d7-ad684ed36d91)
      Attribute 133
      =================================================
      vhostRef 150
      host 127.0.0.1
      port 2222
      transport tcp
      durable False
      state Operational
      lastError Failed over to tcp:10.16.185.15:3333

      Once this occurs, I am unable to delete the link:

      [kgiusti@localhost src]$ qpid-route queue del 127.0.0.1:8888 127.0.0.1:2222 destx src
      [kgiusti@localhost src]$ qpid-tool 127.0.0.1:8888

      qpid: list
      Summary of Objects by Type:
      Package Class Active Deleted
      =======================================================
      org.apache.qpid.broker binding 14 0
      org.apache.qpid.broker system 1 0
      org.apache.qpid.broker broker 1 0
      org.apache.qpid.broker bridge 1 0
      org.apache.qpid.broker link 1 0
      org.apache.qpid.broker subscription 5 0
      org.apache.qpid.broker connection 2 0
      org.apache.qpid.broker session 2 0
      org.apache.qpid.broker queue 6 0
      org.apache.qpid.broker exchange 9 0
      org.apache.qpid.broker vhost 1 0

        Issue Links

          Activity

          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3546/
          -----------------------------------------------------------

          Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross.

          Summary
          -------

          This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically:

          1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info.

          • names beginning with the prefix "qpid." are reserved for qpidd internal use.
          • for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID
            2) the corresponding QMF objects have been updated accordingly, with the additions of:
          • the QMF Link object has been updated to provide a reference to the corresponding Connection
          • the QMF Link object has been modified to allow the host/port/connectionRef to change on failover
          • the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future)
            3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods
            4) Some consolidation of the Link/Bridge creation APIs, specifically:
          • Link/Bridges are created via calls to the LinkRegistry's "declare()" methods
          • Link/Bridges are removed by calling their corresponding "destroy()" methods

          More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier.

          This addresses bug qpid-3767.
          https://issues.apache.org/jira/browse/qpid-3767

          Diffs


          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125
          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125
          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125
          /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125
          /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125
          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125
          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125
          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125
          /trunk/qpid/cpp/src/tests/federation.py 1233125
          /trunk/qpid/specs/management-schema.xml 1233125

          Diff: https://reviews.apache.org/r/3546/diff

          Testing
          -------

          This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase).

          Work remains, but I wanted to get this patch out for discussion before going much farther.

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3546/ ----------------------------------------------------------- Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross. Summary ------- This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically: 1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info. names beginning with the prefix "qpid." are reserved for qpidd internal use. for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID 2) the corresponding QMF objects have been updated accordingly, with the additions of: the QMF Link object has been updated to provide a reference to the corresponding Connection the QMF Link object has been modified to allow the host/port/connectionRef to change on failover the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future) 3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods 4) Some consolidation of the Link/Bridge creation APIs, specifically: Link/Bridges are created via calls to the LinkRegistry's "declare()" methods Link/Bridges are removed by calling their corresponding "destroy()" methods More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier. This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125 /trunk/qpid/cpp/src/tests/federation.py 1233125 /trunk/qpid/specs/management-schema.xml 1233125 Diff: https://reviews.apache.org/r/3546/diff Testing ------- This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase). Work remains, but I wanted to get this patch out for discussion before going much farther. Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3546/#review4469
          -----------------------------------------------------------

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
          <https://reviews.apache.org/r/3546/#comment10022>

          This changes the format of data as stored. Probably worth at least detecting that and giving a clearer message. (e.g. change the short string identifier to bridge-v2 and fail to load older bridge definitions)

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp
          <https://reviews.apache.org/r/3546/#comment10033>

          Given the indexing is changed, and previously I believe that was used to locate the link in order to create a bridge on it, I wonder whether this would break an old qpid-route for example?

          To be clear that is not a real concern to me. I am fine with changing the schema in a non-backward compatible way. However it would be best to be explicit about it (e.g. simply fail on this method as unsupported) and if we were breaking the schema it might be worth seeing if there is anything else we want to change (i.e. bundle up some breaking changes).

          /trunk/qpid/cpp/src/qpid/broker/Connection.cpp
          <https://reviews.apache.org/r/3546/#comment10031>

          assuming the reordering here is necessary, it might be worth a comment explaining why (to prevent it getting reordered incorrectly in any future changes)

          /trunk/qpid/cpp/src/qpid/broker/Link.h
          <https://reviews.apache.org/r/3546/#comment10032>

          no need for const on return type as its not a reference

          /trunk/qpid/specs/management-schema.xml
          <https://reviews.apache.org/r/3546/#comment10035>

          I'm not so keen on objIds... not saying it is wrong, just that its an aspect of QMf I feel uncomfortable with for broker management...

          Being able to easily get at the connection currently in use by a link is certainly important though

          • Gordon

          On 2012-01-19 14:22:45, Kenneth Giusti wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3546/

          -----------------------------------------------------------

          (Updated 2012-01-19 14:22:45)

          Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross.

          Summary

          -------

          This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically:

          1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info.

          - names beginning with the prefix "qpid." are reserved for qpidd internal use.

          - for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID

          2) the corresponding QMF objects have been updated accordingly, with the additions of:

          - the QMF Link object has been updated to provide a reference to the corresponding Connection

          - the QMF Link object has been modified to allow the host/port/connectionRef to change on failover

          - the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future)

          3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods

          4) Some consolidation of the Link/Bridge creation APIs, specifically:

          - Link/Bridges are created via calls to the LinkRegistry's "declare()" methods

          - Link/Bridges are removed by calling their corresponding "destroy()" methods

          More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier.

          This addresses bug qpid-3767.

          https://issues.apache.org/jira/browse/qpid-3767

          Diffs

          -----

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125

          /trunk/qpid/cpp/src/tests/federation.py 1233125

          /trunk/qpid/specs/management-schema.xml 1233125

          Diff: https://reviews.apache.org/r/3546/diff

          Testing

          -------

          This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase).

          Work remains, but I wanted to get this patch out for discussion before going much farther.

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3546/#review4469 ----------------------------------------------------------- /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp < https://reviews.apache.org/r/3546/#comment10022 > This changes the format of data as stored. Probably worth at least detecting that and giving a clearer message. (e.g. change the short string identifier to bridge-v2 and fail to load older bridge definitions) /trunk/qpid/cpp/src/qpid/broker/Broker.cpp < https://reviews.apache.org/r/3546/#comment10033 > Given the indexing is changed, and previously I believe that was used to locate the link in order to create a bridge on it, I wonder whether this would break an old qpid-route for example? To be clear that is not a real concern to me. I am fine with changing the schema in a non-backward compatible way. However it would be best to be explicit about it (e.g. simply fail on this method as unsupported) and if we were breaking the schema it might be worth seeing if there is anything else we want to change (i.e. bundle up some breaking changes). /trunk/qpid/cpp/src/qpid/broker/Connection.cpp < https://reviews.apache.org/r/3546/#comment10031 > assuming the reordering here is necessary, it might be worth a comment explaining why (to prevent it getting reordered incorrectly in any future changes) /trunk/qpid/cpp/src/qpid/broker/Link.h < https://reviews.apache.org/r/3546/#comment10032 > no need for const on return type as its not a reference /trunk/qpid/specs/management-schema.xml < https://reviews.apache.org/r/3546/#comment10035 > I'm not so keen on objIds... not saying it is wrong, just that its an aspect of QMf I feel uncomfortable with for broker management... Being able to easily get at the connection currently in use by a link is certainly important though Gordon On 2012-01-19 14:22:45, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3546/ ----------------------------------------------------------- (Updated 2012-01-19 14:22:45) Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross. Summary ------- This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically: 1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info. - names beginning with the prefix "qpid." are reserved for qpidd internal use. - for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID 2) the corresponding QMF objects have been updated accordingly, with the additions of: - the QMF Link object has been updated to provide a reference to the corresponding Connection - the QMF Link object has been modified to allow the host/port/connectionRef to change on failover - the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future) 3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods 4) Some consolidation of the Link/Bridge creation APIs, specifically: - Link/Bridges are created via calls to the LinkRegistry's "declare()" methods - Link/Bridges are removed by calling their corresponding "destroy()" methods More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier. This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125 /trunk/qpid/cpp/src/tests/federation.py 1233125 /trunk/qpid/specs/management-schema.xml 1233125 Diff: https://reviews.apache.org/r/3546/diff Testing ------- This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase). Work remains, but I wanted to get this patch out for discussion before going much farther. Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/3546/#review4470
          -----------------------------------------------------------

          Looks good overall.

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
          <https://reviews.apache.org/r/3546/#comment10023>

          Is there a backward compatibility issue with adding the new fields at the front?

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp
          <https://reviews.apache.org/r/3546/#comment10036>

          I'm not keen on failing over in maintenance visit. That is potentially a long delay till a broker reconnects. I think we need to be able to trigger reconnects immediately on detecting a close.

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp
          <https://reviews.apache.org/r/3546/#comment10034>

          Not sure I understand the retry semantics, I think this can be simplified. E.g. if the next url isn't different you should keep going till you find one that is, not fall thru to the currentInterval logic. Likewise if next returns false, you should just keep going from the start, not fall thru.

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
          <https://reviews.apache.org/r/3546/#comment10040>

          Throw rather than assert?

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
          <https://reviews.apache.org/r/3546/#comment10041>

          ditto

          /trunk/qpid/specs/management-schema.xml
          <https://reviews.apache.org/r/3546/#comment10042>

          Why is this RC rather than RO? Can you change durability?

          • Alan

          On 2012-01-19 14:22:45, Kenneth Giusti wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/3546/

          -----------------------------------------------------------

          (Updated 2012-01-19 14:22:45)

          Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross.

          Summary

          -------

          This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically:

          1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info.

          - names beginning with the prefix "qpid." are reserved for qpidd internal use.

          - for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID

          2) the corresponding QMF objects have been updated accordingly, with the additions of:

          - the QMF Link object has been updated to provide a reference to the corresponding Connection

          - the QMF Link object has been modified to allow the host/port/connectionRef to change on failover

          - the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future)

          3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods

          4) Some consolidation of the Link/Bridge creation APIs, specifically:

          - Link/Bridges are created via calls to the LinkRegistry's "declare()" methods

          - Link/Bridges are removed by calling their corresponding "destroy()" methods

          More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier.

          This addresses bug qpid-3767.

          https://issues.apache.org/jira/browse/qpid-3767

          Diffs

          -----

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125

          /trunk/qpid/cpp/src/tests/federation.py 1233125

          /trunk/qpid/specs/management-schema.xml 1233125

          Diff: https://reviews.apache.org/r/3546/diff

          Testing

          -------

          This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase).

          Work remains, but I wanted to get this patch out for discussion before going much farther.

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3546/#review4470 ----------------------------------------------------------- Looks good overall. /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp < https://reviews.apache.org/r/3546/#comment10023 > Is there a backward compatibility issue with adding the new fields at the front? /trunk/qpid/cpp/src/qpid/broker/Link.cpp < https://reviews.apache.org/r/3546/#comment10036 > I'm not keen on failing over in maintenance visit. That is potentially a long delay till a broker reconnects. I think we need to be able to trigger reconnects immediately on detecting a close. /trunk/qpid/cpp/src/qpid/broker/Link.cpp < https://reviews.apache.org/r/3546/#comment10034 > Not sure I understand the retry semantics, I think this can be simplified. E.g. if the next url isn't different you should keep going till you find one that is, not fall thru to the currentInterval logic. Likewise if next returns false, you should just keep going from the start, not fall thru. /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp < https://reviews.apache.org/r/3546/#comment10040 > Throw rather than assert? /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp < https://reviews.apache.org/r/3546/#comment10041 > ditto /trunk/qpid/specs/management-schema.xml < https://reviews.apache.org/r/3546/#comment10042 > Why is this RC rather than RO? Can you change durability? Alan On 2012-01-19 14:22:45, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/3546/ ----------------------------------------------------------- (Updated 2012-01-19 14:22:45) Review request for qpid, Alan Conway, Gordon Sim, michael goulish, and Ted Ross. Summary ------- This patch modifies the way the broker's Link and Bridge objects are identified and managed. Specifically: 1) both Bridge and Links are now identified by explict names assigned by management, rather than destination host/port info. - names beginning with the prefix "qpid." are reserved for qpidd internal use. - for backward compatibility, if no name is assigned on creation, the broker will generate a name based on UUID 2) the corresponding QMF objects have been updated accordingly, with the additions of: - the QMF Link object has been updated to provide a reference to the corresponding Connection - the QMF Link object has been modified to allow the host/port/connectionRef to change on failover - the QMF Bridge object has been modified to allow the Channel identifier to change (allowing Bridges to be reassigned to different links in the future) 3) Links/Bridges may now be created/deleted via the QMF Broker's generic "create" and "delete" methods 4) Some consolidation of the Link/Bridge creation APIs, specifically: - Link/Bridges are created via calls to the LinkRegistry's "declare()" methods - Link/Bridges are removed by calling their corresponding "destroy()" methods More importantly, the above changes make it possible to create multiple Links between the same two brokers. This can be done by creating Links to the same destinations with different names. This is a change from the existing behavior, which uses the destination host/port as the unique Link identifier. This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Connection.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.h 1233125 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1233125 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1233125 /trunk/qpid/cpp/src/tests/federation.py 1233125 /trunk/qpid/specs/management-schema.xml 1233125 Diff: https://reviews.apache.org/r/3546/diff Testing ------- This patch fails to pass some of the cluster tests - I'm investigating this now. All non-cluster federation tests where passing (prior to my latest rebase). Work remains, but I wanted to get this patch out for discussion before going much farther. Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/4659/
          -----------------------------------------------------------

          Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey.

          Summary
          -------

          This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects.

          The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge.

          The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change.

          This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge.

          I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model.

          This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release.

          Things this patch does not do, and I'll like to track as separate feature requests if possible:

          o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD.
          o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods.

          Alan - my changes to the HA code are at best a guess, can you take a look?
          Rob - ditto my changes to the Java broker.

          thanks

          This addresses bug qpid-3767.
          https://issues.apache.org/jira/browse/qpid-3767

          Diffs


          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454
          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454
          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454
          /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454
          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454
          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454
          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454
          /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454
          /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454
          /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454
          /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454
          /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454
          /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454
          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454
          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454
          /trunk/qpid/cpp/src/tests/federation.py 1306454
          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454
          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454
          /trunk/qpid/specs/management-schema.xml 1306454
          /trunk/qpid/tools/src/py/qpid-tool 1306454

          Diff: https://reviews.apache.org/r/4659/diff

          Testing
          -------

          make check,
          ant build/test
          windows build via Hudson

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/ ----------------------------------------------------------- Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey. Summary ------- This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects. The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge. The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change. This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge. I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model. This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release. Things this patch does not do, and I'll like to track as separate feature requests if possible: o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD. o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods. Alan - my changes to the HA code are at best a guess, can you take a look? Rob - ditto my changes to the Java broker. thanks This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454 /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454 /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454 /trunk/qpid/cpp/src/tests/federation.py 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454 /trunk/qpid/specs/management-schema.xml 1306454 /trunk/qpid/tools/src/py/qpid-tool 1306454 Diff: https://reviews.apache.org/r/4659/diff Testing ------- make check, ant build/test windows build via Hudson Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/4659/#review6823
          -----------------------------------------------------------

          Ship it!

          Nit-picking only

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h
          <https://reviews.apache.org/r/4659/#comment15188>

          Why passing just the name rather than the Bridge pointer in cancellationlistener? The bridge is more useful.

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp
          <https://reviews.apache.org/r/4659/#comment15196>

          Nit: for consistency use size() rather than length()

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp
          <https://reviews.apache.org/r/4659/#comment15199>

          ostream << Address does print transport:host:protocol if I recall..

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
          <https://reviews.apache.org/r/4659/#comment15197>

          replicatorName(q->getName()) is already unique within the broker (actually its an exchange name) so the UUID is not necessary.

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp
          <https://reviews.apache.org/r/4659/#comment15198>

          Lock is not needed. Activate is called before any concurrent activity starts. (actually not quite true on trunk now, will be true with my next checkin...)

          • Alan

          On 2012-04-05 14:45:55, Kenneth Giusti wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/4659/

          -----------------------------------------------------------

          (Updated 2012-04-05 14:45:55)

          Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey.

          Summary

          -------

          This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects.

          The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge.

          The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change.

          This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge.

          I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model.

          This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release.

          Things this patch does not do, and I'll like to track as separate feature requests if possible:

          o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD.

          o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods.

          Alan - my changes to the HA code are at best a guess, can you take a look?

          Rob - ditto my changes to the Java broker.

          thanks

          This addresses bug qpid-3767.

          https://issues.apache.org/jira/browse/qpid-3767

          Diffs

          -----

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454

          /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454

          /trunk/qpid/cpp/src/tests/federation.py 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454

          /trunk/qpid/specs/management-schema.xml 1306454

          /trunk/qpid/tools/src/py/qpid-tool 1306454

          Diff: https://reviews.apache.org/r/4659/diff

          Testing

          -------

          make check,

          ant build/test

          windows build via Hudson

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/#review6823 ----------------------------------------------------------- Ship it! Nit-picking only /trunk/qpid/cpp/src/qpid/broker/Bridge.h < https://reviews.apache.org/r/4659/#comment15188 > Why passing just the name rather than the Bridge pointer in cancellationlistener? The bridge is more useful. /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp < https://reviews.apache.org/r/4659/#comment15196 > Nit: for consistency use size() rather than length() /trunk/qpid/cpp/src/qpid/broker/Link.cpp < https://reviews.apache.org/r/4659/#comment15199 > ostream << Address does print transport:host:protocol if I recall.. /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp < https://reviews.apache.org/r/4659/#comment15197 > replicatorName(q->getName()) is already unique within the broker (actually its an exchange name) so the UUID is not necessary. /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp < https://reviews.apache.org/r/4659/#comment15198 > Lock is not needed. Activate is called before any concurrent activity starts. (actually not quite true on trunk now, will be true with my next checkin...) Alan On 2012-04-05 14:45:55, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/ ----------------------------------------------------------- (Updated 2012-04-05 14:45:55) Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey. Summary ------- This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects. The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge. The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change. This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge. I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model. This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release. Things this patch does not do, and I'll like to track as separate feature requests if possible: o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD. o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods. Alan - my changes to the HA code are at best a guess, can you take a look? Rob - ditto my changes to the Java broker. thanks This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454 /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454 /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454 /trunk/qpid/cpp/src/tests/federation.py 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454 /trunk/qpid/specs/management-schema.xml 1306454 /trunk/qpid/tools/src/py/qpid-tool 1306454 Diff: https://reviews.apache.org/r/4659/diff Testing ------- make check, ant build/test windows build via Hudson Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/4659/#review6841
          -----------------------------------------------------------

          Ship it!

          • Gordon

          On 2012-04-05 14:45:55, Kenneth Giusti wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/4659/

          -----------------------------------------------------------

          (Updated 2012-04-05 14:45:55)

          Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey.

          Summary

          -------

          This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects.

          The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge.

          The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change.

          This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge.

          I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model.

          This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release.

          Things this patch does not do, and I'll like to track as separate feature requests if possible:

          o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD.

          o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods.

          Alan - my changes to the HA code are at best a guess, can you take a look?

          Rob - ditto my changes to the Java broker.

          thanks

          This addresses bug qpid-3767.

          https://issues.apache.org/jira/browse/qpid-3767

          Diffs

          -----

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454

          /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454

          /trunk/qpid/cpp/src/tests/federation.py 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454

          /trunk/qpid/specs/management-schema.xml 1306454

          /trunk/qpid/tools/src/py/qpid-tool 1306454

          Diff: https://reviews.apache.org/r/4659/diff

          Testing

          -------

          make check,

          ant build/test

          windows build via Hudson

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/#review6841 ----------------------------------------------------------- Ship it! Gordon On 2012-04-05 14:45:55, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/ ----------------------------------------------------------- (Updated 2012-04-05 14:45:55) Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey. Summary ------- This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects. The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge. The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change. This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge. I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model. This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release. Things this patch does not do, and I'll like to track as separate feature requests if possible: o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD. o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods. Alan - my changes to the HA code are at best a guess, can you take a look? Rob - ditto my changes to the Java broker. thanks This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454 /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454 /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454 /trunk/qpid/cpp/src/tests/federation.py 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454 /trunk/qpid/specs/management-schema.xml 1306454 /trunk/qpid/tools/src/py/qpid-tool 1306454 Diff: https://reviews.apache.org/r/4659/diff Testing ------- make check, ant build/test windows build via Hudson Thanks, Kenneth
          Hide
          jiraposter@reviews.apache.org added a comment -

          On 2012-04-10 14:26:01, Alan Conway wrote:

          > /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp, line 57

          > <https://reviews.apache.org/r/4659/diff/1/?file=100190#file100190line57>

          >

          > replicatorName(q->getName()) is already unique within the broker (actually its an exchange name) so the UUID is not necessary.

          Hi Alan - thanks for the review. I'm cleaning up these nits, however:

          If I change the setting of the bridgeName to remove the addition of the uuid, and do this instead:
          bridgeName = replicatorName(q->getName());
          then the following ha tests start failing:

          ha_tests.ShortTests.test_backup_failover:
          AssertionError: Lists differ: ['a'] != []
          ha_tests.ShortTests.test_queue_replica_failover:
          AssertionError: Lists differ: ['a'] != []
          ha_tests.ShortTests.test_send_receive:
          AssertionError: Lists differ: [991L, 992L, 993L, 994L, 995L,... != []
          ha_tests.ShortTests.test_sync:
          AssertionError: Lists differ: ['0', '1', '2', '3', '4', '5',... != []

          I'll re-try this change after I merge the branch to your latest changes on trunk.

          • Kenneth

          -----------------------------------------------------------
          This is an automatically generated e-mail. To reply, visit:
          https://reviews.apache.org/r/4659/#review6823
          -----------------------------------------------------------

          On 2012-04-05 14:45:55, Kenneth Giusti wrote:

          -----------------------------------------------------------

          This is an automatically generated e-mail. To reply, visit:

          https://reviews.apache.org/r/4659/

          -----------------------------------------------------------

          (Updated 2012-04-05 14:45:55)

          Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey.

          Summary

          -------

          This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects.

          The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge.

          The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change.

          This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge.

          I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model.

          This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release.

          Things this patch does not do, and I'll like to track as separate feature requests if possible:

          o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD.

          o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods.

          Alan - my changes to the HA code are at best a guess, can you take a look?

          Rob - ditto my changes to the Java broker.

          thanks

          This addresses bug qpid-3767.

          https://issues.apache.org/jira/browse/qpid-3767

          Diffs

          -----

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454

          /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454

          /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454

          /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454

          /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454

          /trunk/qpid/cpp/src/tests/federation.py 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454

          /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454

          /trunk/qpid/specs/management-schema.xml 1306454

          /trunk/qpid/tools/src/py/qpid-tool 1306454

          Diff: https://reviews.apache.org/r/4659/diff

          Testing

          -------

          make check,

          ant build/test

          windows build via Hudson

          Thanks,

          Kenneth

          Show
          jiraposter@reviews.apache.org added a comment - On 2012-04-10 14:26:01, Alan Conway wrote: > /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp, line 57 > < https://reviews.apache.org/r/4659/diff/1/?file=100190#file100190line57 > > > replicatorName(q->getName()) is already unique within the broker (actually its an exchange name) so the UUID is not necessary. Hi Alan - thanks for the review. I'm cleaning up these nits, however: If I change the setting of the bridgeName to remove the addition of the uuid, and do this instead: bridgeName = replicatorName(q->getName()); then the following ha tests start failing: ha_tests.ShortTests.test_backup_failover: AssertionError: Lists differ: ['a'] != [] ha_tests.ShortTests.test_queue_replica_failover: AssertionError: Lists differ: ['a'] != [] ha_tests.ShortTests.test_send_receive: AssertionError: Lists differ: [991L, 992L, 993L, 994L, 995L,... != [] ha_tests.ShortTests.test_sync: AssertionError: Lists differ: ['0', '1', '2', '3', '4', '5',... != [] I'll re-try this change after I merge the branch to your latest changes on trunk. Kenneth ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/#review6823 ----------------------------------------------------------- On 2012-04-05 14:45:55, Kenneth Giusti wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4659/ ----------------------------------------------------------- (Updated 2012-04-05 14:45:55) Review request for qpid, Alan Conway, Gordon Sim, Ted Ross, and Rob Godfrey. Summary ------- This set of changes modifies the Broker's Link and Bridge objects by changing the way they are indexed. This change is visible to users as it modifies the existing management model for this objects. The current implementation uses the remote broker's Host and Port value to identify the Link, and also as part of the index for identifiying the Bridge. The problem with this approach is that it does not support failover well, where the remote Host and Port values are likely to change. This patch modifies the Link and Bridge object to now be indexed by a unique name (expressed as a string). It removes the host & port indexing from the QMF model. With this patch, host and port are allowed to change over time without invalidating the Link or Bridge. I've also added a reference to the connection that the Link is using - this useful information was missing from the existing model. This patch also introduces the ability to create Links and Bridges via the QMF Broker object's "create" and "delete" method. This feature is yet to be used by qpid-route, however, and the old methods to create Links and Bridges using host and ports are preserved for backward compatibility. We can remove this if desired in a later release. Things this patch does not do, and I'll like to track as separate feature requests if possible: o) Modify the qpid-route tool to allow the ability to name links and bridges if desired - and allowe more control over the management of Links & Bridges - details TBD. o) Java broker support of Link and Bridge naming, and the ability to manage Links/Bridges via the broker's create/delete methods. Alan - my changes to the HA code are at best a guess, can you take a look? Rob - ditto my changes to the Java broker. thanks This addresses bug qpid-3767. https://issues.apache.org/jira/browse/qpid-3767 Diffs ----- /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/LinkRegistry.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Link.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Broker.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.h 1306454 /trunk/qpid/cpp/src/qpid/broker/Bridge.cpp 1306454 /trunk/qpid/cpp/src/qpid/broker/NameGenerator.h 1306454 /trunk/qpid/cpp/src/qpid/broker/RecoveryManagerImpl.cpp 1306454 /trunk/qpid/cpp/src/qpid/cluster/Connection.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/Backup.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/BrokerReplicator.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/HaBroker.cpp 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.h 1306454 /trunk/qpid/cpp/src/qpid/ha/QueueReplicator.cpp 1306454 /trunk/qpid/cpp/src/tests/federation.py 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java 1306454 /trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/LinkConfigType.java 1306454 /trunk/qpid/specs/management-schema.xml 1306454 /trunk/qpid/tools/src/py/qpid-tool 1306454 Diff: https://reviews.apache.org/r/4659/diff Testing ------- make check, ant build/test windows build via Hudson Thanks, Kenneth
          Hide
          Ken Giusti added a comment -

          SVN commits:
          r1342442
          r1334139
          r1334138

          Show
          Ken Giusti added a comment - SVN commits: r1342442 r1334139 r1334138

            People

            • Assignee:
              Ken Giusti
              Reporter:
              Ken Giusti
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development