mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-01 00:50:57 +00:00
c02fd3103c
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. |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
proc-macros | ||
src | ||
tests | ||
testutils | ||
Cargo.toml | ||
LICENSE |