duckdb / duckdb/duckdb-sqllogictest-python

Database file handles are not released on `restart`

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7
Forks
14
PR merge metrics
No merged PRs in 30d

Description

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 "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\a\duckdb-inet\duckdb-inet\configure\venv\Lib\site-packages\duckdb_sqllogictest\__main__.py", line 3, in
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.