Not able to edit page due to 'Could not reconcile content' error
Problem
Page cannot be edited when you are using Confluence 6.13.x and collaborative editing is on. You may encounter below errors from UI, HAR file, and application log.
Error in UI
Below error message will pop up in the page when editing
This page is taking longer than usual to load. After waiting for a while,Please open the page again.
Would you like to solve the problem again? Please contact your Confluence administrator.
Errors in HAR
You may identify some requests with error code, if you look at HAR file.
404 error occurs for synchrony request. The message is 'Not Found'.
Request URL: https://abc.xyz.net/synchrony-proxy/v1/data/Synchrony-2e8b0879-8348-3687-8bec-3b9e506762cc/confluence-427884547?state-at=@head&state-format=type-tagged&rewrite-request=true&cached=false
{"message":"Not Found"}
400 error occurs for synchrony request. It complains “invalid-ancestor“.
Request URL: https://abc.xyz.net/synchrony-proxy/v1/data/Synchrony-fe51b747-b68e-3756-b82f-c77b3e6f2f4b/confluence-53930071?optimistic=true&rewrite-request=true
{"type":"invalid-ancestor","message":"invalid ancestor","id":"gR7im8kt2E75WXHKHImdrw"}
500 error may occur for below request.
Request URL: https://abc.xyz.net/rest/synchrony/1.0/content/427884547/recovery?behind=synchrony&conflictingRev=undefined
Status Code: 500
Errors in Application Log
UNKNOWN_ERROR occurs in application log.
2022-08-15 17:50:18,515 WARN [http-nio-8090-exec-9] [plugins.synchrony.service.SynchronyContentService] runRecoveryInTransaction Could not reconcile content for synchrony-recovery. ID: 53930071 Caused by: com.atlassian.confluence.plugins.synchrony.model.SynchronyException: UNKNOWN_ERROR
-- referer: https://abc.xyz.net/pages/resumedraft.action?draftId=53930075&draftShareId=1d5fabbd-8ce8-4c48-ab8c-2a1adba3ad64 | url: /rest/synchrony/1.0/content/53930071/recovery | traceId: 4458d13434d7a910 | userName: abc
Or same error caused by null
2022-07-25 14:19:56,220 WARN [http-nio-8090-exec-665] [plugins.synchrony.service.SynchronyContentService] runRecoveryInTransaction Could not reconcile content for synchrony-recovery. ID: 427627627 Caused by: null
According to the above errors, it appears ancestor table problem or synchrony cache problem.
However, the symptom does not disappear, though the solutions in following existing knowledges have been applied.
For the error of 'invalid-ancestor', it should be fixed by Rebuilding the Ancestor Table
For the error of 'Could not reconcile content', it should be fixed by the solution in Editing and creating pages fails on Confluence due to content reconciliation errors
Cause
In the Step 3 of How to reduce the size of Synchrony tables , synchrony cache is supposed to be deleted when turning OFF Collaborative Editing.
If there are huge data (like 30,000,000) in synchrony cache table, deleting need some time to complete.
However, if you turned OFF Collaborative Editing(Step 3), and then do stopping confluence (Step 4) immediately, synchrony cache data won’t be deleted.
You will encounter same error repeatedly though you seems applied the steps in How to reduce the size of Synchrony tables .
Solution
When you finished Step 3 of How to reduce the size of Synchrony tables , you should wait until the completion of deleting synchrony cache data. You may check if they have been deleted by below SQL query.
select PROPERTYNAME, count(*) from CONTENTPROPERTIES
where PROPERTYNAME in ( 'sync-rev', 'sync-rev-source') group by PROPERTYNAME;
Once you have confirmed the completion of deleting, you can continue to Step 4 and the following steps of How to reduce the size of Synchrony tables .
This problem will be fixed when you finished all steps.