Skip to content

Database file handles are not released on restart #5

@Maxxen

Description

@Maxxen

Basically, on windows CI runners the filesystem is very slow, and when running a lot of fast tests we get a locking error on the database file handle. Found here https://github.com/Maxxen/duckdb-inet/actions/runs/17855995577/job/50776045739

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\a\duckdb-inet\duckdb-inet\configure\venv\Lib\site-packages\duckdb_sqllogictest\__main__.py", line 3, in <module>
    SQLLogicPythonRunner().run()
  File "D:\a\duckdb-inet\duckdb-inet\configure\venv\Lib\site-packages\duckdb_sqllogictest\python_runner.py", line 208, in run
    result = executor.execute_test(test)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\duckdb-inet\duckdb-inet\configure\venv\Lib\site-packages\duckdb_sqllogictest\python_runner.py", line 129, in execute_test
    os.remove(loaded_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'test/sql/store_ipv6_inet.db'
[1/12] test\sql\inet\test_inet_escape.test

We should make sure to explicitly close/drop the database file handle when restarting, and not wait for python GC to free the resource.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions