-
Notifications
You must be signed in to change notification settings - Fork 105
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
Enable read only DB tests on windows #4200
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4200 +/- ##
==========================================
+ Coverage 86.65% 86.75% +0.10%
==========================================
Files 1327 1327
Lines 51365 51581 +216
Branches 6895 6948 +53
==========================================
+ Hits 44511 44751 +240
+ Misses 6682 6658 -24
Partials 172 172 ☔ View full report in Codecov by Sentry. |
Benchmark ResultMaster commit hash:
|
c17874d
to
18b92c0
Compare
Benchmark ResultMaster commit hash:
|
Exception, | ||
match=r"RuntimeError: IO exception: Could not set lock on file", | ||
): | ||
open_database_on_subprocess(db_path, build_dir) |
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.
I did some tests with the shell, and as far as I can tell on windows you can open the same database in read-write mode, operate on the files, and the files get clobbered by whichever writes last. The locks don't seem to be working properly. It works as expected if you open one in read-only mode though.
The C++ test that does something similar is being skipped, presumably because in addition to windows not supporting this initially, it also wasn't written to work with msvc (among other things it uses fork to create the process, which doesn't exist on windows).
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.
Yeah, the lock is not supported on windows yet. #921
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.
I guess not. I'd seen locking code from #2089, but it doesn't appear to work.
I have a suspicion that the issue is that it locks a region of the file, not the entire file, so locking write access to a zero-length region (as our code currently does) doesn't actually do anything. But maybe it would work if we lock even a single byte instead.
559b2cd
to
ba4822e
Compare
Benchmark ResultMaster commit hash:
|
6e8a160
to
d19b19d
Compare
Benchmark ResultMaster commit hash:
|
d19b19d
to
eb12321
Compare
Benchmark ResultMaster commit hash:
|
eb12321
to
105e629
Compare
Benchmark ResultMaster commit hash:
|
5beaf88
to
ce4de37
Compare
Benchmark ResultMaster commit hash:
|
ce4de37
to
472ceb4
Compare
Benchmark ResultMaster commit hash:
|
7d8270b
to
d12f370
Compare
d12f370
to
3fb4af2
Compare
Benchmark ResultMaster commit hash:
|
(cherry picked from commit d491c4f)
Support for this was implemented a while ago (I don't recall exactly when), but evidently these tests were missed.