Qpid
  1. Qpid
  2. QPID-3829

[Java broker] no-local checking for published messages can prevent 0-8/0-9/0-9-1 connections being garbage collected after they are closed

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.14
    • Fix Version/s: 0.15
    • Component/s: Java Broker
    • Labels:
      None

      Description

      The support for no-local checking for published messages can cause 0-8/0-9/0-9-1 connections to be retained in memory after they are closed, until such time as the published messages are consumed. This is because the ProtocolSession itself is used for the reference check, meaning the messages will reference them and prevent the closed connection (and associated IO threads) being garbage collected until they are themselves are. Short term, the 0-8/0-9/0-9-1 no-local checking should be aligned with the 0-10 behaviour of using a seperate reference object associated with the connection, allowing the connection itself to be collected. Longer term, using the connection IDs etc instead of a separate object would seem more efficient.

        Activity

        Robbie Gemmell created issue -
        Hide
        Robbie Gemmell added a comment -

        Hi Keith, could you review these changes please?

        I have made the 0-8/0-9/0-9-1 connection no-local checking operate the way the 0-10 ones do, as using the connecion IDs instead will need further work to take the federation link/bridge functionality into consideration. As per the commit msg, there is a reinstated NoLocal test that should be removed if changes for QPID-3605 are undertaken, I will post over there accordingly.

        Thanks,
        Robbie

        Show
        Robbie Gemmell added a comment - Hi Keith, could you review these changes please? I have made the 0-8/0-9/0-9-1 connection no-local checking operate the way the 0-10 ones do, as using the connecion IDs instead will need further work to take the federation link/bridge functionality into consideration. As per the commit msg, there is a reinstated NoLocal test that should be removed if changes for QPID-3605 are undertaken, I will post over there accordingly. Thanks, Robbie
        Robbie Gemmell made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Robbie Gemmell made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Robbie Gemmell made changes -
        Assignee Robbie Gemmell [ gemmellr ] Keith Wall [ k-wall ]
        Hide
        Robbie Gemmell added a comment - - edited

        Actualy I changed my mind, that test probably needs to stay after QPID-3605...it just wont test exactly what it does now. It would need to be modified to ensure that messages the client should have got (then excluding the ones that wouldnt have matched the no-local check when they were actually publsihed) but didnt before the broker restarted were successfully delivered afer a new no-local connection was established.

        Show
        Robbie Gemmell added a comment - - edited Actualy I changed my mind, that test probably needs to stay after QPID-3605 ...it just wont test exactly what it does now. It would need to be modified to ensure that messages the client should have got (then excluding the ones that wouldnt have matched the no-local check when they were actually publsihed) but didnt before the broker restarted were successfully delivered afer a new no-local connection was established.
        Hide
        Keith Wall added a comment -

        Reviewed, no comments from me.

        Show
        Keith Wall added a comment - Reviewed, no comments from me.
        Keith Wall made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Keith Wall
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development