Details
-
Bug
-
Resolution: Fixed
-
Low
-
4.14.12, 5.16.11, 7.6.5, 7.11.2, 6.10.10
-
None
-
1
-
Severity 2 - Major
-
1
-
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
- Put the system into maintenance mode
- 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.