Uploaded image for project: 'Maven Resolver'
  1. Maven Resolver
  2. MRESOLVER-521

File locking threads not entering critical region were "oversleeping"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0, 2.0.0-alpha-11
    • Resolver
    • None

    Description

      Instead loser to immediately give up and sleep, should sit a while to enter critical region. This is important for "hot" locks.

      Explanation: currently a "loser" will immediately give up and will go to sleep 100ms, even if winner exits critical region within next 5ms (so lost 95ms). The retry is needed to ensure that it is retried as much as given time/unit takes, that was before consumed by constant retries+sleeps. The logic still works, as if tryLock spends time/unit waiting on critical region (which is possible only on VERY HIGHLY congested locks), there will be no retry happening. Still, now it may sleep 5ms, and "win" once "original winner" left the critical region.

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              cstamas Tamas Cservenak
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: