jj/lib
Yuya Nishihara c02fd3103c op_heads_store: don't test "no heads" error without acquiring lock
I recently got random test_commit_parallel*() failures, and this patch appears
to fix the problem.

SimpleOpHeadsStore::update_op_heads() adds new_id file and removes old_ids
files in that order. It ensures that there exists at least one id file, but it
doesn't mean readdir() can observe the added id file.

 1. process A: get_op_heads() -> opendir()
 2. process B: update_op_heads() -> add_op_head(new_id), remove_op_head(old_id)
 3. process A:                -> readdir() (can miss new_id)

update_op_heads() could do rename(old_ids[0], new_id), but I don't remember if
readdir() can always pick up a renamed entry.
2024-09-21 11:24:00 +09:00
..
benches formatting only: switch to Item level import ganularity 2024-08-22 14:52:54 -04:00
gen-protos
proc-macros formatting only: switch to Item level import ganularity 2024-08-22 14:52:54 -04:00
src op_heads_store: don't test "no heads" error without acquiring lock 2024-09-21 11:24:00 +09:00
tests id_prefix: fix crash on hidden change id disambiguation 2024-09-13 19:32:53 +09:00
testutils tests: remove temporary copy of workspace.repo_path() from TestWorkspace 2024-09-08 05:40:52 +09:00
Cargo.toml cargo: add "clru" dependency 2024-08-29 23:33:37 +09:00
LICENSE