Hi,
I saw your bug [1]
https://bugs.eclipse.org/bugs/show_bug.cgi?id=429717 and was yesterday trying to reproduce the problem. Since in your case we don’t have concurrent write operations against git’s database (only
readers racing against a single writer) I don’t think it’s about data corruption. I guess we have a temporary situation that if a reader asks for objects in a repo in which currently a gc happens he get’s errors. If the same reader reopens the repository a
second later and ask for the same object I think he will be successful. Maybe there are bugs in JGit that we don’t signal this situation correctly. But I am not sure whether we should solve this with synchronizing in GC.
I suggest we discuss this further on the bugzilla bug. I’ll update this now.
Ciao
Chris
From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx]
On Behalf Of Jason Zhao
Sent: Donnerstag, 6. März 2014 20:41
To: jgit-dev@xxxxxxxxxxx
Subject: [jgit-dev] Should repack() be synchronized for ObjectDirectory?
Hey,
I've recently ran into an issue where Git.gc() calls cause FileObjectDatabase.open(ObjectId) calls to fail because objects are being moved around during the repack() call and the FileObjectDatabase does not seem to be synchronized against
the repack().
Is this by design or is there a race condition bug here?