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

.sha1 files not removed from attributes when evicted by evict task

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta
    • Fix Version/s: 1.0.2, 1.1
    • Component/s: None
    • Labels:
      None

      Description

      I built nexus through my nexus install, downloaded all required jars. I then modified the attributes (C:\Development\Programs\Nexus\runtime\work\nexus\proxy\attributes\central\ant\ant\1.5.1\ant-1.5.1.jar && ant-1.5.1.pom.

      After doing this, i noticed a couple of things. First the attributes were deleted, not moved to trash (which may be ok, just want to make sure the is the desired result). Secondly, the .sha1 files generated from the files in the attributes folder aren't removed when the attributes themselves are evicted. This causes the directories to not be deleted (in the proxy/attributes, dir in storage/blah is properly removed)

        Activity

        Hide
        mpowers mpowers added a comment -

        I have looked into this issue, and it is still a problem.

        If there are 2 files in a storage directory, i.e. blah.jar and blah.jar.sha1, there will be 2 corresponding attributes files in the proxy directory.

        If you manually change the lastRequested timestamp of one artifacts attributes, only the artifact is removed, not its .sha1 counterpart. Which should be corrected, however, since this is in the area of deleting files, i dont want to rush this into 1.0.2.

        I would feel more comfortable resolving this issue in 1.1

        This isn't a huge problem, because of the fact that the .sha1 & .md5 files are very small, and will be removed once there time limit has been reached

        Show
        mpowers mpowers added a comment - I have looked into this issue, and it is still a problem. If there are 2 files in a storage directory, i.e. blah.jar and blah.jar.sha1, there will be 2 corresponding attributes files in the proxy directory. If you manually change the lastRequested timestamp of one artifacts attributes, only the artifact is removed, not its .sha1 counterpart. Which should be corrected, however, since this is in the area of deleting files, i dont want to rush this into 1.0.2. I would feel more comfortable resolving this issue in 1.1 This isn't a huge problem, because of the fact that the .sha1 & .md5 files are very small, and will be removed once there time limit has been reached
        Hide
        mpowers mpowers added a comment -

        I decided to fix this in 1.0.2, as i have to wait for the indexer to be ready for staging. Ultimately was a rather easy fix

        Show
        mpowers mpowers added a comment - I decided to fix this in 1.0.2, as i have to wait for the indexer to be ready for staging. Ultimately was a rather easy fix
        Hide
        mpowers mpowers added a comment -

        Fixed, please retest.

        Update on how the evict task now runs.

        First off, the task will ignore any file that ends w/ .asc or .sha1 or .md5

        Upon finding an artifact or pom that needs to be removed, the task will remove the artifact and any associated .asc or .sha1 or .md5 files.

        Show
        mpowers mpowers added a comment - Fixed, please retest. Update on how the evict task now runs. First off, the task will ignore any file that ends w/ .asc or .sha1 or .md5 Upon finding an artifact or pom that needs to be removed, the task will remove the artifact and any associated .asc or .sha1 or .md5 files.
        Hide
        koconnor Kristine O'Connor added a comment -

        I tested this in 1.1, and the jar and pom files were not removed with the evict task task. I had changed the lastRequests time stamp on the jar and pom only to an earlier date, and the value in in the scheduled task is set to 1 day. I have pinged Max about this.

        Show
        koconnor Kristine O'Connor added a comment - I tested this in 1.1, and the jar and pom files were not removed with the evict task task. I had changed the lastRequests time stamp on the jar and pom only to an earlier date, and the value in in the scheduled task is set to 1 day. I have pinged Max about this.
        Hide
        koconnor Kristine O'Connor added a comment -

        This is now working correctly. I wasn't placing the sha1 files in the dir with the jar and pom. Closing defect.

        Show
        koconnor Kristine O'Connor added a comment - This is now working correctly. I wasn't placing the sha1 files in the dir with the jar and pom. Closing defect.

          People

          • Assignee:
            koconnor Kristine O'Connor
            Reporter:
            bdemers Brian Demers
            Last Updated By:
            Jason Dillon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 3h
              3h