summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2023-02-10 21:05:47 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2023-02-11 01:19:28 +0100
commit9424052f2797fabd8e1cee7f404eddadc7e3f72b (patch)
treee377be8141072a49ab031a9f712562b80f494df6 /Documentation
parented2cbd9e8a5714295d0651885ccf3f67088c59b0 (diff)
downloadjgit-9424052f2797fabd8e1cee7f404eddadc7e3f72b.tar.gz
jgit-9424052f2797fabd8e1cee7f404eddadc7e3f72b.zip
Add pack options to preserve and prune old pack files
Add the options - pack.preserveOldPacks - pack.prunePreserved This allows to configure in git config if old packs should be preserved during gc and pruned during the next gc. The original implementation in 91132bb0 only allows to set these options using the API. Change-Id: I5b23ab4f317d12f5ccd234401419913e8263cc9a
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config-options.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/config-options.md b/Documentation/config-options.md
index 169a786579..5d76483acf 100644
--- a/Documentation/config-options.md
+++ b/Documentation/config-options.md
@@ -100,8 +100,8 @@ Proxy configuration uses the standard Java mechanisms via class `java.net.ProxyS
| `pack.depth` | `50` | &#x2705; | Maximum depth of delta chain set up for the pack writer. |
| `pack.indexVersion` | `2` | &#x2705; | Pack index file format version. |
| `pack.minSizePreventRacyPack` | `100 MiB` | &#x20DE; | Minimum packfile size for which we wait before opening a newly written pack to prevent its lastModified timestamp could be racy if `pack.waitPreventRacyPack` is `true`. |
-| `pack.preserveOldPacks` | `false` | &#x20DE; | Whether to preserve old packs in a preserved directory. |
-| `prunePreserved`, only via API of PackConfig | `false` | &#x20DE; | Whether to remove preserved pack files in a preserved directory. |
+| `pack.preserveOldPacks` | `false` | &#x20DE; | Whether to preserve old packs during gc in the `objects/pack/preserved` directory. This can avoid rare races between gc removing pack files and other concurrent operations. If this option is false data loss can occur in rare cases when an object is believed to be unreferenced when object repacking is running, and then garbage collection deletes it while another concurrent operation references this object shortly before garbage collection deletes it. When this happens, a new reference is created which points to a now missing object. |
+| `pack.prunePreserved` | `false` | &#x20DE; | Whether to prune preserved pack files from the previous run of gc from the `objects/pack/preserved` directory. This helps to limit the additional storage space needed to preserve old packs when `pack.preserveOldPacks = true`. |
| `pack.reuseDeltas` | `true` |&#x20DE; | Whether to reuse deltas existing in repository. |
| `pack.reuseObjects` | `true` | &#x20DE; | Whether to reuse existing objects representation in repository. |
| `pack.searchForReuseTimeout` | | &#x20DE; | Search for reuse phase timeout. Expressed as a `Duration`, i.e.: `50sec`. |