Recovering from failed commits in Gerrit

As an administrator, you can use the gerrit_reprocess.pl command to create links.

When a link creation fails when a commit is pushed, an error message is recorded in a log file on the Gerrit server. Use these steps to reprocess the commit operation:

  1. Examine the log file for failed commits. The file is in the <gerrit_root>/hooks/rtchookreprocess directory. File names are of the form yyyymmdd-hh-mmssmicros-n.log, where yyyymmdd-hh-mmssmicros is a time stamp and n is the number of times commit processing failed. The number 1 indicates that it failed once in the hook. A higher number means one or more attempts at reprocessing failed.
  2. From a command prompt, in the <gerrit_root>/hooks directory, type perl gerrit_reprocess.pl. The command reads the logs and reprocesses the commits. If any errors persist, new log files are created. The old log files are removed.

Sample log file

The log file identifies the work item that is being linked to and the Rational® Team Concert project name or hook-configured abbreviation, if known. Each commit is on a separate line and the fields are tab delimited.

Sample log file that shows identifying project information and error message.

Feedback