Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] More problems

2011/6/20 Zivkov, Sasa <sasa.zivkov@xxxxxxx>
> From: jgit-dev-bounces@xxxxxxxxxxx [mailto:jgit-dev-bounces@xxxxxxxxxxx] On Behalf Of Matthias Sohn
> Sent: Montag, 20. Juni 2011 09:40
> To: Robin Rosenberg
> Cc: Sasa Zivkov; JGit Developers list
> Subject: Re: [jgit-dev] More problems
>
> 2011/6/20 Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
> This is what I get:
>
>  ! [remote rejected] HEAD -> refs/for/master (database error)
>
> The server's error log says
>
> [2011-06-20 03:32:02,324] ERROR com.google.gerrit.server.git.ReceiveCommits : Error creating change for commit 529a348961c59413fde0a489ee5118b77f923af0
> com.google.gwtorm.client.OrmException: insert failure on patch_set_ancestors
>       at com.google.gwtorm.schema.sql.SqlDialect.convertError(SqlDialect.java:122)
>       at com.google.gwtorm.jdbc.JdbcAccess.convertError(JdbcAccess.java:331)
>       at com.google.gwtorm.jdbc.JdbcAccess.doInsert(JdbcAccess.java:178)
>       at com.google.gwtorm.jdbc.JdbcAccess.doInsert(JdbcAccess.java:35)
>       at com.google.gwtorm.client.impl.AbstractAccess.insert(AbstractAccess.java:56)
>       at com.google.gerrit.server.git.ReceiveCommits.insertAncestors(ReceiveCommits.java:1972)
>       at com.google.gerrit.server.git.ReceiveCommits.createChange(ReceiveCommits.java:1095)
>       at com.google.gerrit.server.git.ReceiveCommits.createNewChanges(ReceiveCommits.java:1038)
>       at com.google.gerrit.server.git.ReceiveCommits.onPreReceive(ReceiveCommits.java:367)
>       at org.eclipse.jgit.transport.ReceivePack.executeCommands(ReceivePack.java:1027)
>       at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:680)
>       at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:600)
>       at com.google.gerrit.sshd.commands.Receive.runImpl(Receive.java:90)
>       at com.google.gerrit.sshd.AbstractGitCommand.service(AbstractGitCommand.java:103)
>       at com.google.gerrit.sshd.AbstractGitCommand.access$000(AbstractGitCommand.java:34)
>       at com.google.gerrit.sshd.AbstractGitCommand$1.run(AbstractGitCommand.java:69)
>       at com.google.gerrit.sshd.BaseCommand$TaskThunk.run(BaseCommand.java:399)
>       at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>       at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
>       at java.util.concurrent.FutureTask.run(Unknown Source)
>       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
>       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
>       at com.google.gerrit.server.git.WorkQueue$Task.run(WorkQueue.java:324)
>       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
>       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>       at java.lang.Thread.run(Unknown Source)
> Caused by: java.sql.BatchUpdateException: Duplicate entry '10-1-1' for key 1

Looks like mysql sequences (used to generate primary keys) were reset.
Somebody having mysql access would have to check all the sequences and the
existing key values generated out of these sequences and update the sequences
accordingly (to the greatest key value + 1).

Shawn, could you advise how to fix this, the recipe you gave in [1] doesn't seem to
fit for Gerrit 2.2 anymore. I can't issue the insert statements you gave there
as the sequences don't seem to exist anymore. I found that the tables 
change_id, account_id
are empty, we suspect they are replacing the sequences used earlier.

Also the git daemon on egit.eclipse.org didn't start after Denis restarted
the server which was hit by network problems [2]. I started xinetd to fix this.

[1] http://groups.google.com/group/repo-discuss/browse_thread/thread/6016dea3d0baf1c1/
[2] http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg06277.html

--
Matthias

Back to the top