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

"Repair - Rebuild repository browse" task causes BrowseNodeCollisionException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.19.0, 3.26.1, 3.28.1, 3.29.2
    • Fix Version/s: None
    • Component/s: Scheduled Tasks
    • Labels:
    • Notability:
      3

      Description

      SYMPTOM:

      When the "asset" table (class) contains the following records, running "Repair - Rebuild repository browse" task generates BrowseNodeCollisionException:

      +----+------+------+---------+------+
      |#   |bucket|format|component|name  |
      +----+------+------+---------+------+
      |0   |#19:15|raw   |#39:27418|spark |
      |1   |#19:15|raw   |#21:13708|spark/|
      +----+------+------+---------+------+
      
      +----+------+------+---------+-------------------------------------------------------------+
      |#   |bucket|format|component|name                                                         |
      +----+------+------+---------+-------------------------------------------------------------+
      |0   |#20:0 |npm   |#21:394  |workbox-broadcast-update/-/workbox-broadcast-update-4.3.1.tgz|
      |1   |#20:0 |npm   |         |workbox-broadcast-update/-/workbox-broadcast-update-4.3.1.tgz|
      +----+------+------+---------+-------------------------------------------------------------+
      

      The "name" ends with "/" and empty "component" (so that it does not violate the unique key constraint on "asset" table)

      EXPECTED BEHAVIOUR:

      Task should not generate the exception.
      Also, if possible, it would be nice if the task automatically fix the "asset" table by removing the offending asset (eg: "spark/")

      ACTUAL BEHAVIOUR:

      Many WARNs are generated, like below:

      2020-08-26 19:13:28,380+1000 WARN  [quartz-12-thread-7] *SYSTEM org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeManager - Problem generating browse nodes for Asset{metadata=AttachedEntityMetadata{schema=asset, document=#27:158488{bucket:#19:15,component:#39:27418,name:spark,format:raw,last_updated:Fri Apr 03 13:59:54 AEST 2020,attributes:[4],size:471,content_type:text/html,created_by:anonymous,created_by_ip:192.168.1.11,blob_ref:production@DB2FD2DE-2DE764D0-5688CD74-237DB0D3-F5B84F03:58412f05-5f5c-44d1-81de-b7a29d69c285,last_downloaded:Fri Apr 03 13:57:21 AEST 2020,blob_created:Fri Apr 03 13:57:21 AEST 2020,blob_updated:Fri Apr 03 13:57:21 AEST 2020} v3}, name=spark}
      org.sonatype.nexus.repository.browse.internal.orient.BrowseNodeCollisionException: Node already has an asset
      

      Also if Nexus version is older than 3.24, the task fails at the first exception (NEXUS-23870)

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            hosako Hajime Osako
            CC:
            Richard Bywater
            Last Updated By:
            Hajime Osako Hajime Osako
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title