Skip to content

gh-143263: relax test_ctx_mgr_rollback_if_commit_failed for SQLite 3.45+#146575

Draft
picnixz wants to merge 1 commit intopython:mainfrom
picnixz:fix/sqlite3/test-ctx-mgr-rollback-143263
Draft

gh-143263: relax test_ctx_mgr_rollback_if_commit_failed for SQLite 3.45+#146575
picnixz wants to merge 1 commit intopython:mainfrom
picnixz:fix/sqlite3/test-ctx-mgr-rollback-143263

Conversation

@picnixz
Copy link
Copy Markdown
Member

@picnixz picnixz commented Mar 28, 2026

By re-reading the test I'm actually skeptical on my fix so I'll first create a draft for now.

@erlend-aasland you wrote the original test but I am not exactly sure why this is a regression test for the original issue where the DB was locked after failing to rollback. If the original issue does not happen with the latest SQLite versions, maybe we should just guard the test for old SQLite versions and skip it for more recent versions? I don't have an SQLite version I can test at hand though.

@BwL1289 can you check if the original issue (#71521) is still reproducible with recent SQLite versions please?

@BwL1289
Copy link
Copy Markdown

BwL1289 commented Mar 28, 2026

@BwL1289 can you check if the original issue (#71521) is still reproducible with recent SQLite versions please

I am experiencing this issue on the latest sqlite version.

@picnixz
Copy link
Copy Markdown
Member Author

picnixz commented Mar 28, 2026

Oh, so the original issue still exists, namely, the database is still locked?

@BwL1289
Copy link
Copy Markdown

BwL1289 commented Mar 28, 2026

Oh, so the original issue still exists, namely, the database is still locked?

For the original issue I opened, that's correct. TLDR: When using the latest version of sqlite, I encounter #143263

@picnixz
Copy link
Copy Markdown
Member Author

picnixz commented Mar 28, 2026

Sorry, I meant #71521, not your issue. I want to know whether the issue for which the regression test was added actually appeared again in more recent SQLite versions.

More precisely:

I don't know whether what I'm doing for recent SQLite version is relevant. If the test is not relevant for recent SQLite versions, it doesn't make sense to have it for them so I can put the test behind a guard as well and write a new test for the more recent versions that is closer to the original reproducer of #71521. Because with the relaxed test, AFAICT, we don't catch the "locking" state in the first place, and hence it may be better to have another test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants