Uploaded image for project: 'Bitbucket Server'
  1. Bitbucket Server
  2. BSERV-12815

When performing a backup or database migration, database connections are not drained

    XMLWordPrintable

    Details

      Description

      Issue Summary

      When a backup is kicked off (whether using the backup client or DIY scripts), and when in-app database migration is performed, the system starts out by draining in-use database connections and waiting until the pool is idle.

      A change made in Bitbucket Server/Data Center 4.14 introduced a wrapper around the DataSource which the draining code was not updated to handle. As a result, database connections are not drained and backup/migration are allowed to continue with some number of connections potentially still in use.

      Steps to Reproduce

      1. Put the system into maintenance mode
      2. Trigger a backup

      Expected Results

      Database connections are drained.

      Actual Results

      Database connections are not drained.

      The following warning appears in the logs:

      2021-03-09 22:32:44,789 WARN  [hz.hazelcast.cached.thread-33]  c.a.s.i.db.DefaultDatabaseManager The DataSource for the current database does not implement ForcedDrainable. Existing connections will not be closed.
      

      Workaround

      There is no workaround for this issue; it requires an in-code fix.

        Attachments

          Activity

            People

            Assignee:
            bturner Bryan Turner
            Reporter:
            bturner Bryan Turner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Backbone Issue Sync

                • Synchronized with BBSJAC
                  Synced with:
                  BBSJAC-645
                  Issue sync status:
                  UP TO DATE
                  Last received:
                  Last sent: