Skip to content

Close SQLite record connections without changing what callers get back - #2432

Merged
abrignoni merged 3 commits into
mainfrom
sqlite-record-cleanup
Oct 9, 2026
Merged

abrignoni merged 3 commits into
mainfrom
sqlite-record-cleanup

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Closes the SQLite connection that get_sqlite_db_records left open. Built on #2431 by @CyberMike81, with the original commit kept.

  • The helper runs the query at the call and returns [] on failure, as before. As a generator it gave Teleguard Channels no description and never ran the Tutanota probe.
  • A read error part way through a result reaches the caller.
  • PowerLog remembers a failed decompression only when the archive is damaged.
  • 100 reads with the collector off: 4 to 104 open descriptors on main, 4 to 4 here.
  • Full felix23_ios16 run on main and here: 295 tables, 945,842 rows, same rows.

CyberMike81 and others added 3 commits October 9, 2026 13:19
get_sqlite_db_records runs the query at the call again and returns [] when
it fails, so callers that test the result, read cursor.description or only
probe a database behave as before. The rows come back in a small object that
closes its cursor and connection when the rows run out, on close(), on a
read error, and when it is dropped. A read error part way through a result
reaches the caller instead of ending the rows quietly.

PowerLog remembers a failed decompression only when the archive itself is
damaged, so a passing I/O error does not blank the archive for the session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TestCase.enterContext arrived in Python 3.11. Use addCleanup instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

2 participants