Describe the bug
Selecting a new DB doesn't release the cache directory lock on the originally selected DB, causing query runs on the originally selected DB from the CLI to fail.
To Reproduce
- Add two databases, database A and database B to the databases view in the CodeQL extension using the "+" button
- Select database A
- Run a query on database A
- Select database B
- Using the CodeQL CLI run a query on database A
- Observe that database A is still locked:
A fatal error occurred: Error initializing the IMB disk cache: the cache directory is already locked by another running process. Only one instance of the IMB can access a cache directory at a time. The lock file is located at /Users/henry/databases/ppppbn_boardgame_ff33297/db-javascript/default/cache/.lock (eventual cause: OverlappingFileLockException)
Expected behavior
Selecting database B should unlock the cache directory of database A, so that the query from the CLI succeeds.
Additional context
The cache directory of database A will be unlocked when a query is run from the extension on database B.
Describe the bug
Selecting a new DB doesn't release the cache directory lock on the originally selected DB, causing query runs on the originally selected DB from the CLI to fail.
To Reproduce
Expected behavior
Selecting database B should unlock the cache directory of database A, so that the query from the CLI succeeds.
Additional context
The cache directory of database A will be unlocked when a query is run from the extension on database B.