Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] Upcoming 2.1 git-gc feature

On Wed, Sep 5, 2012 at 2:18 PM,  <james.moger@xxxxxxxxxxx> wrote:
> I am intrigued by the upcoming git-gc feature.  Does it play nice with
> the git servlet for allowing live gc?

It should. It probably doesn't. There is a weird condition we have
been annoyed by in Gerrit Code Review where the server doesn't see new
pack files after a `git gc` was run on the command line using the
native git-core implementation. I suspect its the ObjectDirectory code
incorrectly thinking the objects/pack directory is clean, when it
actually has been modified with new pack files. The Java based GC
implementation could cause the same failure. Its not a new problem.

It might be better with the Java implementation if GC runs with the
same Repository instance, as the GC code tells ObjectDirectory what
the new pack files are, which may mask this bug.

GC (in Java or in git-core) is safe to run concurrently with readers.
I'm just not convinced JGit is completely safe here from a reader
perspective, as it sometimes has spurious MissingObjectExceptions that
we have been unable to trace down.


Back to the top