-
Bug
-
Resolution: Fixed
-
Medium
-
6.6.2, 6.6.3, 6.8.0, 6.9.0, 6.11.1
-
21
-
Severity 2 - Major
-
77
-
Summary
Collaborative Editing takes an unfeasible amount of time to enable if the database holds a high number of stale drafts.
Environment
- Confluence 6+
- DC or Standalone
- Reproduced with 20k stale drafts
Steps to Reproduce
- Start Confluence
- Start Synchrony
- Go to the Collaborative Editing management page
- Attempt to enable CE
Expected Results
Collaborative Editing is enabled in a few seconds.
Actual Results
The Change Mode popup keeps spinning and the task is not completed:
Depending on the number of Stale Drafts, this task can take hours to complete or even fail.
Notes
If you take thread dumps while CE is being enabled, we can see that the Remove Stale Drafts task is ongoing. This class can be spotted on the threads:
at com.atlassian.confluence.pages.DefaultPageManager.removeStaleSharedDrafts(DefaultPageManager.java:775)
So, the problem is caused by the inefficiency of the removeStaleSharedDrafts task.
Log Sample
ERROR [Long running task: EnableTask] [springframework.transaction.support.TransactionTemplate] rollbackOnException Application exception overridden by rollback exception -- url: /rest/synchrony-interop/enable | referer: https://confluence.example.com/admin/confluence-collaborative-editor-plugin/configure.action | traceId: 3764f927fd378bc8 | userName: admin java.lang.IllegalStateException: Session/EntityManager is closed ... at com.atlassian.confluence.pages.DefaultPageManager.removeStaleSharedDrafts(DefaultPageManager.java:764) ... at com.sun.proxy.$Proxy2201.removeStaleSharedDrafts(Unknown Source) at com.atlassian.confluence.plugins.synchrony.tasks.EnableTask.execute(EnableTask.java:53) at com.atlassian.confluence.plugins.synchrony.tasks.AbstractConfigLongRunningTask.runInternal(AbstractConfigLongRunningTask.java:65) at com.atlassian.confluence.util.longrunning.ConfluenceAbstractLongRunningTask.run(ConfluenceAbstractLongRunningTask.java:26) at com.atlassian.confluence.util.longrunning.ManagedTask.run(ManagedTask.java:52)
Workaround
Follow the KB below in order to manually remove the staled drafts:
- followed by
-
CONFSERVER-56213 Improve the progress notification when enable Collaboration Editing
- Long Term Backlog
- relates to
-
CONFSERVER-56414 Valid drafts are being removed as a stale draft when we restart Collaborative Editing
- Closed
-
PSR-127 Loading...
- is blocked by
-
PSR-105 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...