Skip to content

#569 SqliteStore#close replaces per-instance at_exit handler#573

Open
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:569-sqlite-store-at-exit
Open

#569 SqliteStore#close replaces per-instance at_exit handler#573
VasilevNStas wants to merge 1 commit into
zerocracy:masterfrom
VasilevNStas:569-sqlite-store-at-exit

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Fixes #569

Removed the per-instance at_exit handler from perform that leaked database file descriptors and accumulated handlers in the test suite.

Added a public close method so callers can close the database connection deterministically. close also sets @db = nil, allowing re-open on next use.

Updated test_defer_db_close_callback to test_close_reopens_on_next_use to directly test explicit close instead of relying on subprocess at_exit behavior.

@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 plz review

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.

SqliteStore#perform leaks a per-instance at_exit handler that pins the database and its file descriptor until interpreter shutdown

1 participant