-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start one background worker on first DuckDB query (#544)
Up until now, we were starting the background worker as part of the extension. The problem with this approach is that it imposes a unique worker, and thus cannot updated multiple database. In preparation to have one BGW per database, this PR triggers the start of a background worker when `IsExtensionRegistered` is called and the cache is populated. We've prevented potential race conditions that would cause two bgw to start by checking a lock on a temporary file. Note: a [following PR](#545) will actually start one BGW per database --------- Co-authored-by: Jelte Fennema-Nio <[email protected]>
- Loading branch information
Showing
4 changed files
with
115 additions
and
17 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