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

indexing tasks may remove already indexed content which differs only by case

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.3
    • Fix Version/s: None
    • Component/s: Search
    • Labels:
      None

      Description

      Run Nexus 2.14.3 on Windows where the filesystem of the sonatype-work/nexus/storage is on a case-insensitive file system (NTFS).

      Upload a Maven 2 artifact to a releases repo with this GAV:

      g: example.app
      a: fake
      v: 1.0
      

      Storage path on windows is

      storage/releases/example/app/fake/1.0/fake-1.0.pom
      

      maven-metadata.xml becomes:

      <?xml version="1.0" encoding="UTF-8"?>
      <metadata>
        <groupId>example.app</groupId>
        <artifactId>fake</artifactId>
        <versioning>
          <latest>1.0</latest>
          <release>1.0</release>
          <versions>
            <version>1.0</version>
          </versions>
          <lastUpdated>20170315142300</lastUpdated>
        </versioning>
      </metadata>
      

      Perform a Keyword Lucene search using term FAKE or fake. Both searches find the uploaded component.

      Then upload

      g: example.app
      a: FAKE
      v: 1.1
      

      maven-metadata.xml becomes:

      <?xml version="1.0" encoding="UTF-8"?>
      <metadata>
        <groupId>example.app</groupId>
        <artifactId>FAKE</artifactId>
        <versioning>
          <latest>1.1</latest>
          <release>1.1</release>
          <versions>
            <version>1.0</version>
            <version>1.1</version>
          </versions>
          <lastUpdated>20170315142844</lastUpdated>
        </versioning>
      </metadata>
      

      Perform a Keyword Lucene search using term FAKE or fake. Both searches find the *2* results, both FAKE and fake.

      A case-insensitive download is also possible. ie. This works:

      http://localhost:8081/nexus/service/local/repositories/releases/content/example/app/fake/1.1/fake-1.1.pom

      Now run update indexes task at the root of the releases repo.

      This removes the already indexed GAVs that do not match actual paths stored on disk. ( ie uppercase FAKE ).

      Now a keyword Lucene search using term FAKE or fake returns only *1* result for the `fake` artifact version 1.0.

      Expected

      • Update indexes or any indexing task should not remove already indexed artifacts that were not deleted from storage.
      • Indexes should be consistent on Windows and Linux

      Workaround

      Users will not have this problem if the storage file system stores paths case sensitively. ( ie. Not Windows )

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  tigCommentSecurity.panel-title