How to reduce the size of Synchrony tables

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

目的

From Confluence 6.0 to 6.15, Synchrony tables are append-only. As the tables increase in size they may become too large for some databases. There are also cases where content reconciliation may fail and it is not possible to publish new content.

Note: In Confluence 7.0 and later, two scheduled jobs are available to evict Synchrony data on a regular basis. See How to remove Synchrony data for more information. 

ソリューション

The Synchrony tables can be truncated to resolve the issue.

Please note that turning Collaborative editing OFF and ON again may remove any unsaved drafts that were not synchronized between Confluence and Synchrony tables. You may refer to this page - How Do Drafts Work on Confluence for detailed information regarding drafts. Please carefully follow the steps below to avoid that situation.

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

  1. To avoid losing unsaved changes, take one of the actions below during a maintenance window:
    1. Have the users publish or discard the changes on the editor before the maintenance, or
    2. Put Confluence on read-only mode, or
    3. Remove Confluence from the Load Balancer or Reverse proxy to avoid users accessing the application and making changes (recommended approach)
  2. Since contents from active editor sessions are synchronized between Confluence and Synchrony tables every 30 seconds, wait for a few minutes to allow this sync to finish
  3. Turn OFF Collaborative Editing
  4. Confluence を停止します。
  5. Truncate the tables:

    (warning) Don't do this while collaborative editing is on

    TRUNCATE TABLE "EVENTS";
    TRUNCATE TABLE "SECRETS";
    TRUNCATE TABLE "SNAPSHOTS";
  6. If running Confluence with MS SQL Server, consider shrinking the database file to recoup disk space.
  7. Confluence を起動します。
  8. Turn ON collaborative editing.

The strategy of removing access to the application and waiting a few minutes should be enough to have the data in the tables above synchronized with the Confluence tables (CONTENT and BODYCONTENT). With copies of the drafts saved, it is safe to clean the Synchrony tables. Also, it is important to stop Confluence as well because any change outside the editor also affects those tables. Marking tasks as completed and adding inline comments are examples of such actions.

In the event that you skip one of the steps above and end up losing any draft changes, use the following KB to recover them from the database backup: 


最終更新日 2020 年 7 月 16 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.