Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6623

CLONE - Queue Iteration on core bridge / clustering will be interrupted if using priorities

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • EAP_EWP 5.1.1 ER3
    • None
    • HornetQ
    • None
    • HornetQ_2_2_3_EAP_GA

    • NEW

    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

        Activity

          People

            csuconic@redhat.com Clebert Suconic
            kisexton_jira Kirk Sexton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: