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

"Repair - reconcile component database from blob store" task does not remove invalid component db references.

    XMLWordPrintable

    Details

    • Notability:
      2

      Description

      The reconcile task does not clean up bad blob references from the component database.

      Reproduce steps:

      1. Fire up a new 3.19.1 instance of Nexus Repo
      2. Create a hosted raw repository
      3. Upload a file to the new raw repository
      4. Locate the blob files created (.properties and .bytes) and delete them
      5. Attempt to download the file

      Observe that this fails with an error:

      Caused by: org.sonatype.nexus.repository.storage.MissingBlobException: Blob default@099C9170-A540438F-65654D48-26A4A334-497D5032:901b2a8c-891c-4d15-8aef-8cceb867846a exists in metadata, but is missing from the blobstore
      at org.sonatype.nexus.repository.storage.StorageTxImpl.requireBlob(StorageTxImpl.java:931)
      at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
      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:53)
      at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63)
      at com.sun.proxy.$Proxy217.requireBlob(Unknown Source)
      at org.sonatype.nexus.repository.raw.internal.RawContentFacetImpl.get(RawContentFacetImpl.java:94)
      at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
      ... 116 common frames omitted

      Now schedule and run a "repair - econcile component database from blob store" to run against the blob store. The task will find the bad database reference:

      2019-12-04 12:02:42,151-0600 ERROR [quartz-3-thread-3] *SYSTEM org.sonatype.nexus.blobstore.restore.DefaultIntegrityCheckStrategy - Blob properties missing for asset 'foo/bar/NOTICE.txt'.

      But after it completes, subsequent download attempts of the file will still fail with a missing blob error.

      Expected: The reconcile task should find (and remove) component database references that point to blob files that no longer exist on disk.  In the above test, the subsequent failure should have been a simple 404, not a 500 with a missing blob error.

       

        Attachments

          Activity

            People

            Assignee:
            dbradicich Damian Bradicich
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Michael Prescott Michael Prescott
            Team:
            NXRM - Neo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title