Comments (1)
Thanks for reporting!
The filesystem probe would be thread-safe (within the worktree-state test-suite) now and I would expect it to be stable - that I have now put to the test as pre-condition.
Otherwise, I don't seem to be able to reproduce the issue locally, neither in single-threaded nor in multi-threaded mode, running it 100 times in short succession.
❯ hyperfine -N -m100 /Users/byron/dev/github.com/Byron/gitoxide/target/debug/deps/worktree-9f25a11ba27ab3a7
Benchmark 1: /Users/byron/dev/github.com/Byron/gitoxide/target/debug/deps/worktree-9f25a11ba27ab3a7
Time (mean ± σ): 212.4 ms ± 11.5 ms [User: 113.8 ms, System: 77.8 ms]
Range (min … max): 204.6 ms … 314.8 ms 100 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
In multi-threaded mode, strangely enough it does appear stable as well.
cargo test -p gix-worktree-state-tests --features gix-features-parallel
❯ hyperfine -N -m100 /Users/byron/dev/github.com/Byron/gitoxide/target/debug/deps/worktree-b64ec3555922d84e
Benchmark 1: /Users/byron/dev/github.com/Byron/gitoxide/target/debug/deps/worktree-b64ec3555922d84e
Time (mean ± σ): 211.2 ms ± 11.9 ms [User: 150.0 ms, System: 106.2 ms]
Range (min … max): 198.2 ms … 322.9 ms 100 runs
Warning: The first benchmarking run for this command was significantly slower than the rest (322.9 ms). This could be caused by (filesystem) caches that were not filled until after the first run. You should consider using the '--warmup' option to fill those caches before the actual benchmark. Alternatively, use the '--prepare' option to clear the caches before each timing run.
However, I think the key here is cargo nextest
, which runs all tests in parallel, thus making it possible for the 'gitoxide repository probe' to be run in parallel.
This may happen in a few places.
In order to fix this particular issue, I think the probe code should throw a lock down into the repository to use the filesystem for synchronization or, probably better, do synchronization in-process. However, the in-process synchronization is probably not good enough for nextest
as it builds all test binaries and then runs them.
An alternative to a lock-file, which I prefer, is to make sure the processes don't step on each others feet, so files they create are uniquely named.
This is certainly the solution we'd have to go for here.
from gitoxide.
Related Issues (20)
- Use Conventional Commits and calculate version number for releases HOT 5
- OSS-Fuzz issue 69636 HOT 1
- Fetching multiple times on Windows with gix 0.63.0 eventually results in "Could not move a temporary file into its desired place" HOT 7
- Trying to fetch only non-existant refs results in "Could not decode server reply" HOT 5
- Sovereign Tech Fund and NLNet Application
- Good first issues?
- `gix-mailmap` parser treats mappings with old but not new names as an error HOT 3
- Checkout fails when Windows symlinks have strangely named targets HOT 2
- PermissionDenied checking Windows symlink target is misinterpreted as collision HOT 3
- Test suite does not assert directory symlink creation HOT 2
- `gix_mailmap::Snapshot` does not implement `Debug` or `Eq` HOT 4
- gix cannot clone a repo with a branch called HEAD HOT 2
- ssh clone does not correctly detect the location of ssh.exe HOT 12
- parsing failure of invalid author/committer line - missing space before email HOT 3
- gix-diff make_diff_repo test fixture archive is always regenerated HOT 2
- many_different_states fails on Windows with GIX_TEST_IGNORE_ARCHIVES=1 HOT 3
- 9 tests rely on commands like `ln -s` making copies instead of symlinks on Windows HOT 4
- gix-config set configuration values HOT 1
- OSS-Fuzz issue 70323 HOT 1
- Something went wrong... & Merge conflict after working on another device HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gitoxide.