Status: Closed (View Workflow)
6.15.1, 7.1.0, 7.2.0, 7.3.0, 7.5.0, 7.4.0, 7.6.0, 7.7.0, 7.8.0, 7.9.0, 7.10.0, 7.0.0, 7.11.0, 7.12.0
When editing a page, the page content, or a subset of the page content is duplicated. This behaviour occurs intermittently without any special actions by the user.
This behaviour is not consistently reproducible, but may occur when a page is edited.
The editor should display only the page content.
The content appears to be duplicated in edit mode, and publishing the page results in the duplicated content being visible in view mode.
tl;dr - Confluence and Synchrony metadata intermittently falls out of sync triggering a chain of events that result in content duplication.
When a user clicks the edit button, Synchrony will reconcile (merge) the page content held by Synchrony, with the draft content held in Confluence. This reconciled content is then sent to the web browser to be displayed in the editor, along with draft and synchrony metadata. When the editor loads, it synchronizes the new content back to Synchrony in a process called a client reconciliation to ensure everything is in sync.
The content duplication occurs during this client reconciliation phase. From the reports provided by customers and our internal reproduction work, we identified that the Synchrony metadata being provided contained a null value in place of the expected revision data. When Synchrony performed the client reconciliation, it performed the operation with an empty source document, thus all the content in the draft from the browser appeared new. Synchrony takes this "new" content, and adds it to the existing Confluence draft. This data is then sent back to the browser, where the user will see this duplicated content.
On the surface this may seem a nonsensical approach, but in the context of Synchrony, this approach works perfectly so long as the correct Synchrony metadata is provided. This explains how the content duplication occurs, but the root cause is earlier in the process when the page was last saved from Synchrony into the Confluence database.
Confluence takes advantage of an event system in the Hibernate Object Relation Manager. When a page is saved from Synchrony to Confluence, an event fires that synchronizes the metadata for Confluence and Synchrony, then cleans up stale Synchrony metadata. We identified that this event was intermittently and silently failing, resulting in the old metadata being left in Confluence, and then the matching metadata in Synchrony being deleted. Thus the when Synchrony performs the first reconciliation above, it does so with metadata from Confluence that doesn't exist in Synchrony, resulting in a null version being returned, and subsequently being served to the browser.
This issue was often automatically corrected by Confluence depending on a host of conditions that are outside of the scope of this explanation. This further obscured the root cause of the issue as it added a level of randomness to an already intermittent issue.
- In the Editor, click the Ellipsis (...) symbol
- Click Revert to last published version