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

Race Condition when deleting repo and permission too fast

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 7.12.6
    • Fix Version/s: None
    • Component/s: Artifactory
    • Severity:
      Medium

      Description

      Problem

      Assuming I create the following repo and permission:

      • my-repo-generic-local (Permission allowing user to access the following repo, with a user from LDAP)
      • my-repo-generic-local (Repo, generic type)

      Then when I delete those in the following order:

      1. Delete permission
      2. Delete repo

      I cause the following error:

      Deleting repo 'my-repo-generic-local' failed: Could not merge and save new descriptor 
      [org.jfrog.common.ExecutionFailed: 
      Last retry failed: Failed to reload configuration: 
      Could not update permission my-repo-generic-local with identifier jfrt@01bpse5w0hm6r20hn9aa3d116k:fa257f54-4b14-438f-b51c-388a159ab4d6. 
      Not trying again (code exception)]
      

      This only happens if I delete the repo shortly after the permission that affects it (in our case about <10s).

      After the error occurs, I'm left with the repo "my-repo-generic-local" that now is claiming to be "blacked out" and can neither be deleted nor modified anymore, because it "doesn't exist".

       

      Probable Cause
      To me it seems like the permission is deleted with a delay, meaning it's not really gone when I get the according UI response. When I try to re-create the same permission too fast (after deleting it), I also get an error about the permission already existing.

       

      Workaround

      A workaround to resolve this problem is to re-create the repo under the same name, which actually succeeds and then delete it again.

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              mdegel Marian Degel
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-24890 -
                  SYNCHRONIZED
                  • Last Sync Date: