Skip to content

drop(): a drop that raises because a file stayed leaves a closed handle - #567

Merged
tae898 merged 3 commits into
mainfrom
fix/554-drop-closes-handle
Dec 2, 2026
Merged

tae898 merged 3 commits into
mainfrom
fix/554-drop-closes-handle

Conversation

@tae898

@tae898 tae898 commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #554

After db.drop() raised because the engine could not delete every file (engine 26.12.1, upstream PR 13609 closes the database before it throws), the handle still counted as open: the JVM build set _closed only after a drop that returned, and the native library kept the closed database in its handle registry. Both now treat the handle as closed, which is what how-to/databases-and-queries.adoc already promises, so no docs change.

Check Result
tests/test_drop_failure.py on the JVM build against the 26.12.1 snapshot (engine 26.12.1.dev0), with the fix 1 passed
the same test with core.py of main DID NOT RAISE (the closed handle is not recognized), so the test fails without the fix

The test is not collected on Windows or as root (chmod cannot block a delete there) and xfails on an engine before 26.12.1, so the native legs, which still link 26.11.1, xfail until the dev-engine bump. The Java change in ArcadeNative.java is not run locally: the native image is built by the native CI of this PR.

…le (#554)

Since engine 26.12.1 (arcadedb#13609) LocalDatabase.drop() closes the database, deletes the files and then throws when an entry is left. The JVM build set its closed flag only after a drop that returned; the native build kept the closed database in its handle registry. Both now treat the handle as closed, which is what how-to/databases-and-queries.adoc already says. The regression test makes the drop fail with chmod 0o500 (not collected on Windows or as root) and xfails on an engine before 26.12.1, where drop only logs. Verified on the JVM build against the 26.12.1 snapshot; the native library change is covered by the native CI, whose engine still links 26.11.1 until the dev-engine bump.
@tae898 tae898 closed this Dec 2, 2026
@tae898 tae898 reopened this Dec 2, 2026
…since a skip or xfail fails the parity gate (#554)

On engine 26.11.1 drop() returns after logging, so the test does not expect a raise there; the handle must be closed either way.
@tae898 tae898 closed this Dec 2, 2026
@tae898 tae898 reopened this Dec 2, 2026
@tae898
tae898 merged commit f5c2497 into main Dec 2, 2026
25 checks passed
@tae898
tae898 deleted the fix/554-drop-closes-handle branch December 2, 2026 18:44
@github-actions github-actions Bot added this to the 26.12.1 milestone Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drop(): after the engine refuses to delete every file, the Python handle still counts as open

1 participant