Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-25601

Artifactory upgrade to version 7.17.x may fail due to duplication of a column in DB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Resolution: Done
    • Affects Version/s: 7.15.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Severity:
      Critical

      Description

      Description: 

      In some cases Artifactory upgrade to version 7.17.x fails due to a migration task which may run twice during the upgrade process and fail with a “column already exists” error following its creation in the first run.

       

      An example of the error with PostgreSQL database:

      2021-04-09T20:45:54.611Z [1;32m[jfrt ][0;39m [31m[WARN ][0;39m [2c69a276cd85f446] [o.j.s.u.DbStatementUtils:62   ] [ocalhost-startStop-2] - Failed to execute query: ERROR: column "props_md5" of relation "node_meta_infos" already exists:
      ALTER TABLE node_meta_infos ADD COLUMN props_md5 CHAR(32)
      2021-04-09T20:45:54.615Z [1;32m[jfrt ][0;39m [1;31m[ERROR][0;39m [2c69a276cd85f446] [.s.d.v.c.DbSqlConverterUtil:94] [ocalhost-startStop-2] - Could not convert DB using v228_node_meta_infos converter due to ERROR: column "props_md5" of relation "node_meta_infos" already exists
      org.postgresql.util.PSQLException: ERROR: column "props_md5" of relation "node_meta_infos" already exists
      

       

      An example of the error with Derby database:

      2021-04-09T19:37:02.957Z [jfrt ] [WARN ] [a5161eaa891e9c33] [o.j.s.u.DbStatementUtils:62   ] [ocalhost-startStop-2] - Failed to execute query: Column 'PROPS_MD5' already exists in Table/View '"APP"."NODE_META_INFOS"'.:
      ALTER TABLE node_meta_infos ADD COLUMN props_md5 CHAR(32)
      2021-04-09T19:37:02.960Z [jfrt ] [ERROR] [a5161eaa891e9c33] [.s.d.v.c.DbSqlConverterUtil:94] [ocalhost-startStop-2] - Could not convert DB using v228_node_meta_infos converter due to Column 'PROPS_MD5' already exists in Table/View '"APP"."NODE_META_INFOS"'.
      java.sql.SQLException: Column 'PROPS_MD5' already exists in Table/View '"APP"."NODE_META_INFOS"'.
      

        Attachments

          Activity

              People

              Assignee:
              rotemk Rotem Kfir
              Reporter:
              amitm Amit Michaely
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-25601 -
                  SYNCHRONIZED
                  • Last Sync Date: