Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
6.13.13, 7.4.0
-
15
-
Severity 3 - Minor
-
2
-
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
- Synchrony tables will be dropped and have their schema updated to reflect new table columns and keys (documented in brief here: Editing and creating pages fails on Confluence due to content reconciliation errors - Unknown column 'snapshots0_.contentid' in 'field list'
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
- You can manually drop the Synchrony tables and recreate them using the schema workaround noted in the Editing and creating pages fails on Confluence due to content reconciliation errors - Unknown column 'snapshots0_.contentid' in 'field list'.
- Technically, you don't have to drop the tables, but they do need to be empty, so truncating them pre-upgrade will also allow for the upgrade to complete successfully.