Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-29100

The "change repository blob store" task leaves a dangling reference when run against a group blob store

    XMLWordPrintable

    Details

    • Notability:
      3

      Description

      1. Create a file based blob store
      2. Promote that blob store to a group
      3. Create a new repository that uses the group blob store
      4. Create an "admin - change repository blob store" task to change the repository's blob store to an existing blob store
      5. Run the task
      6. Remove the "admin - change repository blob store" task.
      7. Attempt to delete the group blob store.

      This will fail with an error:

      2021-09-27 12:44:36,848-0500 WARN [qtp290816218-115] admin org.sonatype.nexus.siesta.internal.UnexpectedExceptionMapper - (ID 5f75743c-7d1d-474b-b3f0-fbb446245d49) Unexpected exception: java.lang.IllegalStateException: BlobStore xyz is in use by a Change Repository Blob Store task
      java.lang.IllegalStateException: BlobStore xyz is in use by a Change Repository Blob Store task
      at org.sonatype.nexus.repository.internal.blobstore.BlobStoreManagerImpl.delete(BlobStoreManagerImpl.java:305)
      at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
      at org.sonatype.nexus.blobstore.rest.BlobStoreResource.deleteBlobStore(BlobStoreResource.java:106)
      at org.apache.shiro.guice.aop.AopAllianceMethodInvocationAdapter.proceed(AopAllianceMethodInvocationAdapter.java:49)
      at org.apache.shiro.authz.aop.AuthorizingAnnotationMethodInterceptor.invoke(AuthorizingAnnotationMethodInterceptor.java:68)

      But there is no such task in the tasks UI. Examining the database shows there is still a "change_repository_blob" store record in the database:

      { "@class": "change_repo_blobstore", "@fieldTypes": "process_start=t", "@rid": "#159:0", "@type": "d", "@version": 1, "process_start": 1632764658, "repository_name": "xyz", "source_blobstore_name": "xyz", "target_blobstore_name": "default" }
      

      Expected: Deleting the "change repository blob store" via the task UI should have cleaned up this record.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title