ancestor テーブルの再構築

お困りですか?

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

コミュニティに質問

ancestor テーブルは、ページの親と子孫 (子) の関係を記録します。また、ページが親ページから閲覧制限を継承するかどうかを決定する際にも使用されます。 

まれに、ancestor テーブルのレコードが破損する場合があります。これが発生した場合、ancestor テーブルを再構築する必要があります。

ancestor テーブルの再構築が必要かどうかを確認する方法...

次のクエリを実行します。

SELECT A.ANCESTORID, A.DESCENDENTID, COUNT(A.DESCENDENTID)
FROM CONFANCESTORS A, CONTENT B
WHERE B.CONTENTID = A.DESCENDENTID
GROUP BY A.ANCESTORID, A.DESCENDENTID HAVING COUNT(A.DESCENDENTID) != 1
ORDER BY 3 DESC

このクエリで結果が返される場合、ancestor テーブルが壊れており、再構築が必要です。

ancestor テーブルの再構築

上位テーブルを再構築するには:

  1. データベースをバックアップします。
  2. 次の URL を使用して、ページ レベル権限 ページへアクセスします。 
    <your-site>/admin/permissions/pagepermsadmin.action
  3. 上位テーブルを再構築する」を参照してください。 

  4. > [一般設定] > [キャッシュ管理] に移動します。
  5. 継承されたコンテンツ権限キャッシュを消去します。 
You may also need to rebuild the content index so that the permissions take effect in search results.

平均的なサイズのサイトでは、このプロセスに約 10 分かかり、その間新しいコンテンツを保存できない可能性があります。そのため、データベースの完全バックアップを実行してから、保守時間枠内でこの処理を完了させることを強く推奨します

再構築の進捗状況の追跡

ancestor テーブルの再構築の進捗状況を追跡するには、次の手順を実行します。

  1. > [一般設定] > [ログとプロファイルの作成] に進みます。
  2. 次のエントリを追加し、ログ出力レベルを INFO に設定します。

    com.atlassian.confluence.pages.ancestors.HibernatePageAncestorManager

    詳細は、「ログ作成の設定」を参照してください。 

  3. To prevent the logs filling up, and rolling over too quickly while the rebuild is happening, you can temporarily add the following entry, setting the logging level to FATAL

    com.atlassian.confluence.security.persistence.dao.hibernate.HibernateContentPermissionSetDao
  4. Open <confluence_home>/logs/atlassian-confluence.log. You should now see additional ancestor table logging, similar to the example below:

    2018-07-25 20:48:56,202 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Started
    2018-07-25 20:48:56,213 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] clearHibernateCollectionCache Evicting the contents of Hibernate 'com.atlassian.confluence.pages.Page.ancestors' collection cache
    2018-07-25 20:48:56,235 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] apply Stored ancestors for child pages... 16/16
    2018-07-25 20:48:56,236 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Ancestors persisted to database in 11 ms
    2018-07-25 20:48:56,237 INFO [http-nio-8666-exec-10] [confluence.pages.ancestors.HibernatePageAncestorManager] rebuild Complete!
  5. Once the process has completed successfully, remove the logging levels you added.
最終更新日 2020 年 9 月 3 日

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

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