jj/lib
Martin von Zweigbergk 02486dc064 fallback: replace use of backoff crate of by own implementation
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.
2024-11-11 07:04:21 -08:00
..
benches style: add semicolon at the end of expressions used as statements 2024-10-04 22:29:13 +02:00
gen-protos cargo: inherit lints configuration from workspace 2024-10-04 22:29:13 +02:00
proc-macros style: remove useless uses of .iter() 2024-10-04 22:29:13 +02:00
src fallback: replace use of backoff crate of by own implementation 2024-11-11 07:04:21 -08:00
tests test_git: fix some clippy ref errors 2024-11-08 13:59:37 -05:00
testutils repo_path: add stub for checked to_fs_path(), rename unchecked functions 2024-11-06 15:03:41 -08:00
Cargo.toml fallback: replace use of backoff crate of by own implementation 2024-11-11 07:04:21 -08:00
LICENSE cargo: add LICENSE file to each crate we publish 2023-09-22 21:48:28 -07:00