Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8712

RetryStrategy tries one time too often

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.7
    • 3.5.4, 3.4.9, 4.0.0, 3.6.0
    • Clustering
    • None
    • Unknown

    Description

      The maxNumberOfRetries is not correctly evaluated in the RetryStrategy. If it is set to 3, the amount of retries is actually 4.

      This is due to the fact that getNextAlternate() will return the same result for both stillTheSameAddress returning either false or true.
      Although the break condition in https://github.com/apache/cxf/blob/75fb6bb56d82f72771a9ee6ecab5d36168303f51/rt/features/clustering/src/main/java/org/apache/cxf/clustering/RetryStrategy.java#L55 is correct, the logic in https://github.com/apache/cxf/blob/75fb6bb56d82f72771a9ee6ecab5d36168303f51/rt/features/clustering/src/main/java/org/apache/cxf/clustering/RetryStrategy.java#L45 is flawed, as it will not return the next alternate in case stillTheSameAddress returns false.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: