Re: [PATCH] gc: do not warn about too many loose objects
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Jul 16, 2018, 19:19 UTC
- Message-ID
- <20180716191923.GC11513@aiede.svl.corp.google.com>
- In-Reply-To
- <20180716191505.857-1-newren@gmail.com>
Hi,
Elijah Newren wrote:
Show 7 quoted lines
> The basic problem here, at least for us, is that gc has enough > information to know it could expunge some objects, but because of how > it is structured in terms of several substeps (reflog expiration, > repack, prune), the information is lost between the steps and it > instead writes them out as unreachable objects. If we could prune (or > avoid exploding) loose objects that are only reachable from reflog > entries that we are expiring, then the problem goes away for us.
My understanding is that exploding the objects is intentional behavior, to avoid a race where objects are newly referenced while they are being pruned.
I am not a fan of that behavior. It's still racy. But when we've brought it up in the past, the consensus seems to have been that it's better than nothing. Documentation/technical/hash-function-transition.txt section "Loose objects and unreachable objects" describes a way to eliminate the race.
Thanks and hope that helps, Jonathan