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

Purge Nexus Timeline task calculates wrong purge "window" days

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.11
    • 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, 2.9, 2.9.1, 2.9.2, 2.10
    • System Feeds
    • Yes
    • Sprint 29, Sprint 30

    Description

      The "purge" operation of Timeline in NX2 calculates wrongly the "days" parameter, making the "window" much bigger then parametrised (taking it's square more precisely). The persist part does the purge well, but the Lucene index will contain way more records than it should.

      After persistor is invoked with "days" to purge, indexes – that uses millis instead of days as input parameter – is invoked like this:

      indexer.purge(0l, System.currentTimeMillis() - (days * TimeUnit.DAYS.toMillis(days)), null, null);
      

      Link to code:
      https://github.com/sonatype/nexus-oss/blob/3f84f826318b78855ddac5d55a5560aedbe5227e/plugins/basic/nexus-timeline-plugin/src/main/java/org/sonatype/timeline/internal/DefaultTimeline.java#L179

      Attachments

        Issue Links

          Activity

            People

              rseddon Rich Seddon
              cstamas Tamás Cservenák
              Peter Lynch Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                tigCommentSecurity.panel-title