Skip to content

Selecting a different DB doesn't release the cache directory lock on the original DB #249

@henrymercer

Description

@henrymercer

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

  1. Add two databases, database A and database B to the databases view in the CodeQL extension using the "+" button
  2. Select database A
  3. Run a query on database A
  4. Select database B
  5. Using the CodeQL CLI run a query on database A
  6. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Complexity: HighRequires careful design or review.VSCodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions