Jira Cloud to Server export is failing due to broken sequences

XMLWordPrintable

    • 2
    • Severity 3 - Minor

      Issue Summary

      When Cloud -> DC export is performed, we see a few entries in SequenceValueItem that have stale values for seqId attribute. This results in the primary key collision during importing in DC. Currently, OSPropertyEntry is the main affected table.
      These SequenceValueItem entries contain next valid id for the DB tables and if that is not up to date, it causes collisions during insertions

      This is reproducible on Data Center: Not reproducible via UI

      Steps to Reproduce

      Not reproducible via UI

      Expected Results

      We should not have stale entries in SequenceValueItem and import in DC should run successfully

      Actual Results

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

      Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "pk_propertyentry"
        Detail: Key (id)=(XXXX) already exists.
      

      Workaround

      We have to modify the entities.xml file in the following way:

      <SequenceValueItem seqName="OSPropertyEntry" seqId="{maxId}"/> 

      For the seqName=OSPropertyEntry, we should update the value of the maxId with the max value of id present in XML file for the XML tag

       

      <OSPropertyEntry id= 

      If this happens for any other entity during import, we update the sequence for that entity as mentioned above.

       

       ** 

            Assignee:
            Sriteja Parimi
            Reporter:
            Sriteja Parimi
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: