No reviewers
Labels
No labels
Kind/Bug
Kind/Feature
Priority/High
Priority/Medium
Reviewed/Confirmed
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ai-collab/bulk-image-organizer!112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "0.1.37/issue-27-34-close-directory"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
WorkingDB/GlobalConfigDBread or write opened a SQLite connection via a barewith self._connect() as conn:, which only commits/rolls back the transaction — it never closes the connection. A local repro confirmed this leaks file descriptors even after an explicitgc.collect()(200 connections → ~100 leaked fds), explaining a Windowshandle64.exedump showing dozens of simultaneous open handles to the working DB and global config DB. Every call site now routes through the existing properly-closingtransaction()helper in both DB classes. Kept the earlier WAL-checkpoint + Windows-mmap-disable mitigation as defense in depth._remove_from_recent()helper already existed but was dead code; the close handler now calls it.Test plan
ruff check/ruff format --checkpytestsuite (372 passed, 1 skipped)test_repeated_reads_do_not_leak_connection_handles,test_repeated_pref_reads_do_not_leak_connection_handles)test_close_directory_and_delete_cache_clears_last_opened)./scripts/smoke-ui-exit.sh— no Qt shutdown errors./scripts/check-version-bump.sh— VERSION bumped 0.1.37 → 0.1.38Closes #27, #34.