You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
drop(): after the engine refuses to delete every file, the Python handle still counts as open #554
main at 75e8290 on an engine with PR 13609 (upstream 2026-11-27, so 26.12.1)
Expected behavior
When db.drop() raises because the engine could not delete every file, the Python handle says what the engine says: the database is closed. db.is_open() is False, a later db.close() (for example from with) does nothing, and the native package forgets the handle.
Actual behavior
From reading the code, I have not made a drop fail. Since PR 13609, LocalDatabase.drop() closes the database, deletes the files, and then throws DatabaseOperationException ("was closed but its files could not be deleted") when an entry is left. The bindings set their closed flag only after a drop that returns:
arcadedb-jvm, Database.drop() in core.py: self._closed = True comes after self._java_db.drop(), so after the error the handle still counts as open and close() calls the engine's close() on a closed database.
arcadedb, drop() in _native/database.py: the same, and arcadedb_n_close in ArcadeNative.java throws before DBS.remove(h), so the registry keeps the closed database.
Before PR 13609 the engine only logged a warning and returned, so this could not happen.
Steps to reproduce
On Linux or macOS, with an engine that has PR 13609:
importos, arcadedbdb=arcadedb.create_database("/tmp/drop-fails")
os.chmod("/tmp/drop-fails", 0o500) # no entry of the directory can be removedtry:
db.drop()
exceptarcadedb.ArcadeDBErrorase:
print(e)
print(db.is_open()) # expected Falsedb.close() # expected to do nothing
This does not block 26.12.1: the drop already fails with a clear error, and #552 documents it. A fix sets the closed flag (and removes the native handle) when the engine reports the database closed, with a regression test that makes the drop fail on Linux and macOS.
Activity