Issue 1789: Gerrit repository broken after changing project settings or garbage collection
Status:  New
Owner: ----
Reported by afest...@gmail.com, Feb 16, 2013

Affected Version: 2.5.1, 2.5.2

What steps will reproduce the problem?
1. In existing project, change settings in UI to require change-id and automatically resolve conflicts
2. Project owner pushes new changes (error "no new changes")
3. Clone project to fresh repository (repository is empty)

So far I managed to reproduce it once, though with a copy of the VM it is running in that was right before the error occured (so the whole procedure above might be pure coincidence)

What is the expected output? What do you see instead?

Expected: pushed changes appear in origin/master, cloned repository contains project files

See: repository is empty, objects are there, all refs are gone (including master)


What steps will reproduce the problem?
1. In existing project, stop gerrit
2. In repository, do git gc
3. Start gerrit
4. Push changes (error)
5. Clone repository again (empty)

What is the expected output? What do you see instead?

Expected: pushed changes appear in origin/master, cloned repository contains project files

See: repository is empty, packed refs look "consistent", pointing at "Initial empty repository" with date of actual repository creation. Fetching from working directory sets origin/master to an apparently unconnected commit. This time, "master" is there, but looks like Gerrit halfway reinitialized the repository (looks like a new commit id, but has the original date).


Please provide any additional information below.

Basically Gerrit broke the test repositories twice within a few days in two different ways (the second time one can argue it was "git gc" rather than Gerrit).

While it looks somewhat like what is described here: http://blog.wikimedia.org/2012/09/07/recovery-of-broken-gerrit-repositories/

However, git fsck doesn't show errors and git show only shows the "initial commit".

Setup:
-Virtual Box running Ubuntu 12.10 64bit
-Fresh install with only Gerrit and Jenkins
-Gerrit uses H2 database and DEVELOPMENT_BECOME_ANY_ACCOUNT