Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-60093

Upgrading from Confluence 6 to 7 can cause Synchrony schema to not update successfully

    XMLWordPrintable

Details

    Description

      Issue Summary

      When performing an upgrade to Confluence from 6 to 7, there is a schema change for Synchrony to support new Data Eviction standards. However, under certain circumstances this schema update can fail and the new columns and keys will not be properly created, causing post-upgrade Collaborative Editor issues.

      Steps to Reproduce

      Perform an upgrade from Confluence 6 to 7

      Expected Results

      Actual Results

      • Collaborative editing will fail after the upgrade
      • It seems that the schema update will fail to drop the Synchrony tables (evidenced by the tables having content in them still after the upgrade). The actual rest of the upgrade completes successfully
      • In Oracle, you may see the following error message after the failed update to the Synchrony table schema during the upgrade.  Here, we see the Synchrony tables cleanup scheduled job failing:
      2020-07-27 17:10:00,024 ERROR [Caesium-1-2] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job SynchronyEventsSoftRemovalScheduledJob#SynchronyEventsSoftRemovalScheduledJob failed to run
      org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      	at org.springframework.orm.hibernate5.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:230)
      	at org.springframework.orm.hibernate5.HibernateTemplate.doExecute(HibernateTemplate.java:391)
      ...
      Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
      ...
      Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: "SNAPSHOTS0_"."inserted": invalid identifier
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
      ...
      Caused by: Error : 904, Position : 177, Sql = select * from ( select distinct snapshots0_."contentid" as col_0_0_ from "SNAPSHOTS" snapshots0_, CONTENT contentent1_ where snapshots0_."contentid"=contentent1_.PREVVER(+) and snapshots0_."inserted"<=:1  and (contentent1_.CONTENT_STATUS is null or contentent1_.CONTENT_STATUS='draft') and (contentent1_.LASTMODDATE is null or contentent1_.LASTMODDATE<=:2 ) ) where rownum <= :3 , OriginalSql = select * from ( select distinct snapshots0_."contentid" as col_0_0_ from "SNAPSHOTS" snapshots0_, CONTENT contentent1_ where snapshots0_."contentid"=contentent1_.PREVVER(+) and snapshots0_."inserted"<=? and (contentent1_.CONTENT_STATUS is null or contentent1_.CONTENT_STATUS='draft') and (contentent1_.LASTMODDATE is null or contentent1_.LASTMODDATE<=?) ) where rownum <= ?, Error Msg = ORA-00904: "SNAPSHOTS0_"."inserted": invalid identifier
      	at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
      	... 68 more
      

      Workaround

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bcostales Bernabe Theodore Costales III
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated: