Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-19757

The cwd_tombstone table is not getting cleaned up by Bitbucket

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • None
    • Crowd
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Problem Definition

      The cwd_tombstone table records removed users, groups, memberships and aliases during incremental synchronization for external user directories.

      Over time, this table will continue to grow when left unchecked. The Crowd application has the capability to remove records older than 7 days. However, this is not implemented in Bitbucket.

      Suggested Solution

      Add a cleanup job so that cwd_tombstone records older than 7 days are removed.

      Why This Is Important

      The disk consumption of the cwd_tombstone table can significantly grow in size over time so it has to be cleaned up without user intervention.

      Workaround

      Manually delete records from the cwd_tombstone table which are older than 7 days (based on the tombstone_timestamp column)

      • Stop Bitbucket
      • Take a backup of the database and the filesystem
      • Delete cwd_tombstone records older than 7 days. Adjust the WHERE clause as necessary based on the database.
        DELETE FROM cwd_tombstone WHERE tombstone_timestamp < (EXTRACT(EPOCH FROM current_timestamp) - 7 * 24 * 60 * 60) * 1000;
        
      • Start Bitbucket

              Unassigned Unassigned
              aaff5594b3eb Aedrian Escultura
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: