-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable "housekeeping" tasks for db opened with openAgain() (#2223)
Adds a flag `C4DB_NoHousekeeping` that suppresses database "housekeeping" tasks, and makes C4Database::openAgain() set this flag in the database it opens. Housekeeping tasks like expiring documents and SQLite vacuuming only need to be done by one database connection (C4Database), but we do them in all connections. This means CBL wastes some time and also opens twice as many SQLite connections as it needs to (that _backgroundDB that DatabaseImpl opens.) It also enables a nasty deadlock condition when the replicator closes its database(s) -- the close call happens on an actor thread, and ends up calling Housekeeper::stop, which sends an Actor message to the Housekeeper and blocks until it's processed. But if all actor threads are doing this, there are no threads left to actually run the Housekeeper. [CBSE-19205]
- Loading branch information
Showing
6 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters