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

Admin - Remove a member from a blob store group (blobstore.group.memberRemoval) task processes source blobstore temporary files



      For a File based blobstore, temporary blobstore files are created under ./content/tmp directory.

      The Admin - Remove a member from a blob store group task is intended to move all source blobstore *.bytes and *.properties files to another Group blobstore member, and then delete the source blobstore, if it is empty.

      While the task makes the source blobstore read-only during this move, it also tries to move files that are temporary. When it does this, there could be errors loading these temporary files which fail the task. It also has been shown it is possible a blobstore can contain "temp" files that do not start with the expected "tmp$" prefix as the current task expects.

      Example task ERROR when properties file under ./content/tmp is processed by the task
      2019-09-19 12:38:00,905+0100 WARN  [ForkJoinPool-10-worker-1] *SYSTEM org.sonatype.nexus.blobstore.file.FileBlobStore - Attempt to access non-existent blob 6eb610f6-4054-4b86-9170-6ddb9ebddb80 (/Users/hnagra/sonatype_prods/nexus/nexus3/nexus-3.18.1-01-mac/sonatype-work/nexus3/blobs/default/content/vol-10/chap-04/6eb610f6-4054-4b86-9170-6ddb9ebddb80.properties)
      2019-09-19 12:38:00,907+0100 ERROR [quartz-3-thread-15] *SYSTEM com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask - Member removal task did not complete successfully
      java.util.concurrent.ExecutionException: java.lang.NullPointerException
       at java.util.concurrent.ForkJoinTask.get(ForkJoinTask.java:1006)
       at com.sonatype.nexus.blobstore.group.internal.tasks.BlobStoreGroupMemberRemovalTask.execute(BlobStoreGroupMemberRemovalTask.java:123)


      Do not move any temporary files from the source blobstore ( ie. ./content/tmp/** ) to a target group blobstore as NXRM cannot reliably read temporary files or resume using them in a different blobstore. Do not assume all "temp" files start with the prefix "tmp$" either - at least in older versions of NXRM3, having different named "temp" files seems possible.

      Do not move files where a .properties file exists, but a bytes file does not and do not move files where a .bytes file exists, but a .properties file does not - instead log this condition with the found file name, the missing (expected) file name, and if one of the orphaned files is a properties file, log the contents of the properties file, without trying to parse it, in case the contents are corrupt or empty. Also log the file system create date of the found file. If these orphaned files are found, the task should continue and move all the valid blobstore files it can find.

      TBD: S3 Blobstore Impact

      S3 blobstores also have a temporary blob concept as well. Code review needs to be performed to see if S3 temp blobs are impacted in a similar way.


          Issue Links



              mjohnson Matt Johnson
              plynch Peter Lynch
              Last Updated By:
              Rich Seddon Rich Seddon
              NXRM - Neo
              0 Vote for this issue
              4 Start watching this issue


                Date of First Response: