Uploaded image for project: 'HornetQ'
  1. HornetQ
  2. HORNETQ-705

Iteration witih multiple priorities can stop delivery on Bridge (and eventually consumers also).

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Done
    • 2.2.0.GA
    • 2.2.5.Final
    • Core
    • None

    Description

      Under sufficient load and using different priorities to publish messages, the bridge queue leaks messages that never seem to get delivered.

      The PriorityLinkedListImpl allows for concurrent iteration over a priority list. Howevever it is not thread safe. I was seeing that the instance of the prioritylinkedlistimpl was showing a size of 1 in the iterator, although all of the priority queues showed a size of 0. This was resolved with the synchronized access on the MUTEX variable.

      But this was not enough, I was still seeing the loop in the QueueImpl exit prematurely. This is because the hasNext() was returning false even though there was a member in one of the priority queues. This occurred when the member in the priority queue was at a priority less than the highest priority but greater than current index. It seems that the lastreset counter could not be incremented since the highest priority was too high, thus the iterator could not detect the new element in the list. This was resolved by incrementing lastreset everytime a new member is added.

      Attachments

        Issue Links

          Activity

            People

              csuconic@redhat.com Clebert Suconic
              kisexton_jira Kirk Sexton (Inactive)
              Archiver:
              samahaja@redhat.com Sagar Mahajan

              Dates

                Created:
                Updated:
                Resolved:
                Archived:

                PagerDuty