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

Reconcile task with last X days option checks all properties files

    Details

    • Notability:
      3
    • InvestmentLayer:
      support-escalated
    • Aha Concept:
      non-concept

      Description

      ISSUE:
      When running Reconcile Task with, Only blobs created last X days, option and integrity check selected, the task checks all the properties file in the blobstore, causing long runtime and delay in recovery.

      This is causing bad customer experience and misunderstanding.

      REPRODUCE STEPS:

      1. Install new Nexus Instance and create a raw-hosted repository
      2. Use below curl command multiple times to populate the repository
        curl -uadmin:admin123 -T <(echo "test at $(date +'%Y-%m-%d %H:%M:%S')") -L -k "http://localhost:8081/repository/raw-hosted/test/test_$(date +'%Y%m%d%H%M%S')
      3. Create new "Repair - Reconcile component database from blob store" task with below settings
        • Dry Run - Selected
        • Only blobs created since X days ago: - 1
        • Restore Blob Metadata - Selected
        • Integrity Check - Selected
      4. Enable debug level for below logger
        org.sonatype.nexus.common.property.PropertiesFile
        
      5. Run reconcile task created in Step 1 and monitor the task log, which should show the task accessing all the properties file in blobstore, not just the ones created in last 1 day.

      Sample logs below

      2022-09-13 15:27:45,541+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.restore.datastore.RestoreMetadataTask -  Name: reconcile-1day
      2022-09-13 15:27:45,541+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.restore.datastore.RestoreMetadataTask -  Description: Uses blobs in a blobstore to restore assets to a repository
      2022-09-13 15:27:45,542+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.restore.datastore.RestoreMetadataTask - ::DRY RUN:: Actions will be logged, but no changes will be made.
      2022-09-13 15:27:45,542+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.BlobStoreReconciliationLogger - Processing file '2022-09-12'
      2022-09-13 15:27:45,543+1000 DEBUG [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.common.property.PropertiesFile - Loading: /opt/sonatype-work/nexus3/blobs/npm-repo/content/directpath/health-check/npm-proxy/summary/bootstrap-tooltip.js.properties
      ;
      ;
      2022-09-13 15:27:49,559+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.restore.datastore.DefaultIntegrityCheckStrategy - Elapsed time: 3.863 s, processed: 2363, failed integrity check: 0
      2022-09-13 15:27:49,559+1000 INFO  [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.blobstore.restore.datastore.DefaultIntegrityCheckStrategy - Checking integrity of assets in repository 'sri-npm-proxy' with blob store 'npm-repo'
      2022-09-13 15:27:49,563+1000 DEBUG [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.common.property.PropertiesFile - Loading: /opt/sonatype-work/nexus3/blobs/npm-repo/content/vol-25/chap-27/18b462e0-0e6f-4aad-95cd-a14662ee8b3d.properties
      2022-09-13 15:27:49,563+1000 DEBUG [quartz-19-thread-31]  *SYSTEM org.sonatype.nexus.common.property.PropertiesFile - Loading: /opt/sonatype-work/nexus3/blobs/npm-repo/content/vol-25/chap-27/18b462e0-0e6f-4aad-95cd-a14662ee8b3d.properties
      

      EXPECTED BEHAVIOR:
      Task should only check the assets created in last X days, selected in the task settings.

      Also adding more details to the task description would help customer understanding of task behavior with various options.

      ACTUAL BEHAVIOR:
      Task checks all the properties files in a large blobstore, resulting in long recovery time.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            sappusamy Srinivasan Appusamy
            Last Updated By:
            Michael Oliverio Michael Oliverio
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:

                tigCommentSecurity.panel-title