Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4
    • None
    • core/other
    • None
    • Operating System: All
      Platform: All

    • 33799

    Description

      In org.apache.lucene.store.Lock, line 57 (lucene_1_4_final branch):

      if (++sleepCount == maxSleepCount)

      is incorrect, the sleepCount is incremented before the compare causing it
      throwing the exception with out waiting for at least 1 interation.

      Should be changed instead to:
      if (sleepCount++ == maxSleepCount)

      As this is a self-contained simple fix, I am not submitting a patch.

      Thanks

      -John

      Attachments

        1. LockTest.java
          1 kB
          pirxpilot

        Activity

          People

            java-dev@lucene.apache.org Lucene Developers
            john.wang@gmail.com John Wang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: