Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-188

Jira Migration Assistant fails with "More than one migrated file found for attachment XXXX"

    XMLWordPrintable

Details

    • 1
    • Severity 3 - Minor

    Description

      Issue Summary

      When the customer tries to migrate Projects from Jira server to Jira Prod cloud site using Jira Migration Assistant, Project migration fails with an Error. However, no error was thrown during the previous Test migration attempt to a different site. 
       

      Steps to Reproduce

      1. Not applicable for all the migration scenarios. 
      2. The basic step to rep-produce is to migrate the project from Server to Cloud using Jira Migration Assistance. 

      Expected Results

      Not Applicable

      Actual Results

      Not Applicable

      The below exception is thrown in the xxxxxxx.log file:

      2020-05-06 19:54:51,679+0100 pool-10-thread-1 INFO      [c.a.j.m.tracking.polling.StatusPoller] Migration aaaaaaa-12345-67890-bbbbb-cccceeee completed, Migration errors: projectDataUpload#ABC: java.lang.IllegalStateException: More than one migrated file found for attachment 111111 (StackTrace=java.lang.IllegalStateException: More than one migrated file found for attachment 111111
          	at com.atlassian.jira.migration.migration.MigratedFileRepository.findMigration(MigratedFileRepository.kt:69)
          	at com.atlassian.jira.migration.workers.AttachmentMediaIdService$generateAttachmentMediaIdsForProject$2.invoke(AttachmentMediaIdService.kt:43)
          	at 
      
      More than one migrated file found for attachment XXXX
      

       Cause of the issue:

      1. In the plugin, we upload attachments using a MediaID the plugin receives from the Media API in the cloud.
      2. This MediaID is paired with the attachments and stored in the DB.
      3. It is possible that the main site and the sandbox use the same MediaID.
      4. i.e. the first migration to the sandbox is successful, but not the second migration to the main site because of the conflicting MediaID.
      5. Therefore, truncating the DB will resolve the issue as it will remove the conflicts.

      Workaround

      Please do reach out to the Atlassian support to confirm if you should Delete or truncate the table.  The workaround is to delete or truncate the AO_6FF49D_MIGRATED_FILE table prior to migrating to the production site. This can be done using either of the SQL below:

      DELETE FROM AO_6FF49D_MIGRATED_FILE
      // or
      TRUNCATE TABLE AO_6FF49D_MIGRATED_FILE 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sp@atlassian.com SriKumar P (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: