-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlite: split up large test file #54014
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Weird. Now Windows is failing because the tmp directory cleanup is failing with EPERM. |
I'm a bit worried that #53617 may have introduced a subtle change in behaviour/regression. |
The current test is large and can time out. It should be split into multiple smaller tests as done in nodejs#54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made.
The issue with these smaller tests appears to be related to relying on GC to finalize the prepared statements and close the database connections. Fixing it properly will take a little more time, so I have opened #54031 to mark the original test as flaky in the mean time. |
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
ab6834b
to
31e8790
Compare
There have been so many problems lately with EPERM on Windows that I'm not sure the failures on Windows were ever related to the changes in this PR. Starting the CI all over again to see how it goes. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54014 +/- ##
==========================================
- Coverage 87.10% 87.10% -0.01%
==========================================
Files 647 647
Lines 181739 181775 +36
Branches 34887 34897 +10
==========================================
+ Hits 158310 158337 +27
+ Misses 16738 16736 -2
- Partials 6691 6702 +11
|
3ca154d
to
ee5b9c1
Compare
I've made the changes I outlined in #54014 (comment). This is now more than just a test change. The CI seems happy (still resuming some unrelated failures). I would appreciate re-reviews. |
Landed in 0301309...b8a2550 |
This commit adds statement tracking to the DatabaseSync class. When a database is closed manually or via garbage collection, it will force all associated prepared statements to be finalized. This should mitigate "zombie" connections which can introduce test flakiness in the CI on Windows. PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
The original test/parallel/test-sqlite.js test appears to time out in the CI occasionally. This commit splits the test into several smaller test files. Fixes: #54006 PR-URL: #54014 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
This commit adds statement tracking to the DatabaseSync class. When a database is closed manually or via garbage collection, it will force all associated prepared statements to be finalized. This should mitigate "zombie" connections which can introduce test flakiness in the CI on Windows. PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
The original test/parallel/test-sqlite.js test appears to time out in the CI occasionally. This commit splits the test into several smaller test files. Fixes: #54006 PR-URL: #54014 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
This commit adds statement tracking to the DatabaseSync class. When a database is closed manually or via garbage collection, it will force all associated prepared statements to be finalized. This should mitigate "zombie" connections which can introduce test flakiness in the CI on Windows. PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
The original test/parallel/test-sqlite.js test appears to time out in the CI occasionally. This commit splits the test into several smaller test files. Fixes: #54006 PR-URL: #54014 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: #54014 Fixes: #54006 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
The current test is large and can time out. It should be split into multiple smaller tests as done in #54014. However, that approach appears to change GC behavior such that the database files are not cleaned up quickly enough on Windows. Forcing any unfinalized SQL statements to be GC'ed appears to fix the problem. Mark the original test as flaky until the necessary code changes are made. PR-URL: #54031 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Jake Yuesong Li <[email protected]> Reviewed-By: Stefan Stojanovic <[email protected]> Reviewed-By: Richard Lau <[email protected]>
The original test/parallel/test-sqlite.js test appears to time out in the CI occasionally. This commit splits the test into several smaller test files.
Fixes: #54006