mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-27 06:23:18 +00:00
02486dc064
https://rustsec.org/advisories/RUSTSEC-2024-0384 says to migrate off of the `instant` crate because it's unmaintained. We depend on it only via the `backoff` crate. That crate also seems unmaintained. So this patch replaces our use of `backoff` by a custom implementation. I initially intended to migrate to the `backon` crate, but that made `lock::tests::lock_concurrent` tests fail. The test case spawns 72 threads (on my machine) and lets them all lock a file, and then it waits 1 millisecond before releasing the file lock. I think the problem is that their version of jitter is implemented as a random addition of up to the initial backoff value. In our case, that means we would add at most a millisecond. The `backoff` crate, on the other hand does it by adding -50% to +50% of the current backoff value. I think that leads to a much better distribution of backoffs, while `backon`'s implementation means that only a few threads can lock the file for each backoff exponent. |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |