Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-16570

Cleared remote file lock might fail the download request (but successfully cache the file)

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 5.5.0
    • Fix Version/s: None
    • Component/s: Filestore
    • Labels:
      None

      Description

      Summary:

      Single (not HA) Artifactory instances use local (JVM) memory to lock file paths to protect concurrent actions such as another parallel download of the same file from remote resources.

      A timeout controls the time a single lock is held for a file path, by default this is set to 30 minutes and can be modified using the following system property:

      hazelcast.max.lock.lease.time.minutes

      When this time elapses for a single download, a lock will released.

      In return, this might fail a remote repository request file download and return a 500 status for the client however would still cache the item successfully in Artifactory.

      Steps to reproduce:

      1. Decrease the timeout under artifactory.system.properties && hazelcast.max.lock.lease.time.minutes and set it to 1 minute (& restart Artifactory)
      2. Set up a remote repository
      3. Fetch a file that would take more than a minute to download and wait for it to fail with a 500 status and the following message:

      Could not process download request: Failed to release lock for key: jcenter-cache/test/test.jar
      

      and observe that following error in the Artifactory:

      2018-05-2 15:13:15,034 [http-nio-8081-exec-8] [WARN ] (o.a.r.ArtifactoryResponseBase:107) - Sending HTTP error code 500: Could not process download request: Failed to release lock for key: jcenter-cache/test/test.jar
      
      • You will still be able to download the file after this is cached

      Workaround

      Increase the timeout to a time value larger than your expected most prolonged download

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                andreik Andrei Komarov
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: