Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] JGit patches



On Jan 9, 2018 6:00 AM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
moving this conversation to the list

On Jan 8, 2018 3:27 PM, Matthias Sohn <matthias.sohn@xxxxxxxxx> wrote:
You mentioned that you are using an old JGit version and have a couple of JGit patches you have done in your fork which you didn't yet contribute upstream. I'd be interested to get them so everyone can benefit.

So during gc you want to first delete old packed-refs from last repack in preserved/ directory,
then repack refs into a new packed-refs file and move the old packed-refs file to the preserved/ directory ?

Instead of a move, a hardlink should be created, this ensures that an existing view of the file, old or new always exists.  This must be followed by a move of the new file on top of the old one.

And this would ensure that another node not doing repack could concurrently still read from the preserved/packed-refs file.

Yes.  I guess in theory this same approach should apply to individual ref files too, on any updates to them.   We haven't done that, but it could be the source of some operations failing intermittently at times.

Thanks for your inquiries, more later...

-Martin



Back to the top