diff options
author | Nick Thomas <nick@gitlab.com> | 2019-07-09 16:52:04 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-09 16:52:04 +0000 |
commit | 0b92417452b8b9eea191e33ee2082b178ab66cf9 (patch) | |
tree | c62e2eb35b5e8ab7f62dd0ea0b826eab2aa43480 | |
parent | 6d3fede0af1de2106ec5779e33f0571f3e4261d2 (diff) | |
parent | e2eb0f8bfbedb40ccf507f58d778991c0e5eda2a (diff) | |
download | gitlab-ce-0b92417452b8b9eea191e33ee2082b178ab66cf9.tar.gz |
Merge branch 'jramsay/enable-object-dedupe-by-default' into 'master'
Enable repository object pools by default
Closes gitaly#1606
See merge request gitlab-org/gitlab-ce!29595
-rw-r--r-- | app/models/project.rb | 2 | ||||
-rw-r--r-- | changelogs/unreleased/jramsay-enable-object-dedupe-by-default.yml | 5 | ||||
-rw-r--r-- | doc/administration/repository_storage_types.md | 19 |
3 files changed, 13 insertions, 13 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index 0f4fba5d0b6..075f7882d72 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -2144,7 +2144,7 @@ class Project < ApplicationRecord public? && repository_exists? && Gitlab::CurrentSettings.hashed_storage_enabled && - Feature.enabled?(:object_pools, self) + Feature.enabled?(:object_pools, self, default_enabled: true) end def leave_pool_repository diff --git a/changelogs/unreleased/jramsay-enable-object-dedupe-by-default.yml b/changelogs/unreleased/jramsay-enable-object-dedupe-by-default.yml new file mode 100644 index 00000000000..b953d7c0fc8 --- /dev/null +++ b/changelogs/unreleased/jramsay-enable-object-dedupe-by-default.yml @@ -0,0 +1,5 @@ +--- +title: Enable Git object pools +merge_request: 29595 +author: jramsay +type: changed diff --git a/doc/administration/repository_storage_types.md b/doc/administration/repository_storage_types.md index f4cb89c84a4..9dea6074a3f 100644 --- a/doc/administration/repository_storage_types.md +++ b/doc/administration/repository_storage_types.md @@ -80,25 +80,20 @@ by another folder with the next 2 characters. They are both stored in a special ### Hashed object pools -CAUTION: **Beta:** -Hashed objects pools are considered beta, and are not ready for production use. -Follow [gitaly#1548](https://gitlab.com/gitlab-org/gitaly/issues/1548) for -updates. +> [Introduced](https://gitlab.com/gitlab-org/gitaly/issues/1606) in GitLab 12.1. -For deduplication of public forks and their parent repository, objects are pooled -in an object pool. These object pools are a third repository where shared objects -are stored. +Forks of public projects are deduplicated by creating a third repository, the object pool, containing the objects from the source project. Using `objects/info/alternates`, the source project and forks use the object pool for shared objects. Objects are moved from the source project to the object pool when housekeeping is run on the source project. ```ruby # object pool paths "@pools/#{hash[0..1]}/#{hash[2..3]}/#{hash}.git" ``` -The object pool feature is behind the `object_pools` feature flag, and can be -enabled for individual projects by executing -`Feature.enable(:object_pools, Project.find(<id>))`. Note that the project has to -be on hashed storage, should not be a fork itself, and hashed storage should be -enabled for all new projects. +Object pools can be disabled using the `object_pools` feature flag, and can be +disabled for individual projects by executing +`Feature.disable(:object_pools, Project.find(<id>))`. Disabling object pools +will not change existing deduplicated forks, but will prevent new forks from +being deduplicated. DANGER: **Danger:** Do not run `git prune` or `git gc` in pool repositories! This can |