Joey Hess <
i...@joeyh.name> writes:
> Thanks for confirming that bup-split is probably not concurrency safe.
I'm only 97% sure it's not safe, but yeah.
> Do you think that an operation like bup-join that (I assume) only reads
> existing data is likely to be safe to run several instances concurrently?
I think that is going to be ok. I would say if bup join writes at all,
that's a bug, and I can't see how read-read would go wrong.
So one writer, or N readers, but a writer and some readers seems not
ok.
I suspect the fundamental issue is that as bup saves, it
writes a tmp packfile, and this should be ~ok because the random-ish
names will ~never collide
moves that into place, and that should be ok given naming
creates (sometimes, not sure), midx files that aggregate the idx files
to make object lookup work. This involves reading all the idx files
and writing a midx and that seems to be what is collding. The obvious
plan is to have a lock for writing to midx, and I think the scary part
is that locking is not universally reliable -- but I think that if it
worked when POSIX locks works, it would be a huge step forward.
Keep in mind that I am a little fuzzy on all of this.