Add a repository-maintenance doc
Add a small doc to explain the need for repository maintenance (git garbage collection). This doc is a place that hopefully could eventually also have some best practices. Change-Id: I7a05807dd7e11fa6e5fe00456bd639e031605542
This commit is contained in:
@@ -75,6 +75,7 @@
|
||||
. link:config-reverseproxy.html[Reverse Proxy]
|
||||
. link:config-auto-site-initialization.html[Automatic Site Initialization on Startup]
|
||||
. link:pgm-index.html[Server Side Administrative Tools]
|
||||
. link:repository-maintenance.html[Repository Maintenance]
|
||||
. link:user-request-tracing.html[Request Tracing]
|
||||
. link:note-db.html[NoteDb]
|
||||
. link:config-accounts.html[Accounts on NoteDb]
|
||||
|
||||
32
Documentation/repository-maintenance.txt
Normal file
32
Documentation/repository-maintenance.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
= Gerrit Code Review - Repository Maintenance
|
||||
|
||||
== Description
|
||||
|
||||
Each project in Gerrit is stored in a bare Git repository. Gerrit uses
|
||||
the JGit library to access (read and write to) these Git repositories.
|
||||
As modifications are made to a project, Git repository maintenance will
|
||||
be needed or performance will eventually suffer. When using the Git
|
||||
command line tool to operate on a Git repository, it will run `git gc`
|
||||
every now and then on the repository to ensure that Git garbage
|
||||
collection is performed. However regular maintenance does not happen as
|
||||
a result of normal Gerrit operations, so this is something that Gerrit
|
||||
administrators need to plan for.
|
||||
|
||||
Gerrit has a built-in feature which allows it to run Git garbage
|
||||
collection on repositories. This can be
|
||||
link:config-gerrit.html#gc[configured] to run on a regular basis, and/or
|
||||
this can be run manually with the link:cmd-gc.html[gerrit gc] ssh
|
||||
command, or with the link:rest-api-projects.html#run-gc[run-gc] REST API.
|
||||
Some administrators will opt to run `git gc` or `jgit gc` outside of
|
||||
Gerrit instead. There are many reasons this might be done, the main one
|
||||
likely being that when it is run in Gerrit it can be very resource
|
||||
intensive and scheduling an external job to run Git garbage collection
|
||||
allows administrators to finely tune the approach and resource usage of
|
||||
this maintenance.
|
||||
|
||||
GERRIT
|
||||
------
|
||||
Part of link:index.html[Gerrit Code Review]
|
||||
|
||||
SEARCHBOX
|
||||
---------
|
||||
Reference in New Issue
Block a user