From 0a2c14522813b57d75912058a5baacd6ec9e7815 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Tue, 16 Apr 2019 18:04:47 +0200 Subject: [PATCH 1/2] Add dedup demo script --- doc/demos/dedup.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 doc/demos/dedup.md diff --git a/doc/demos/dedup.md b/doc/demos/dedup.md new file mode 100644 index 00000000000..db375819424 --- /dev/null +++ b/doc/demos/dedup.md @@ -0,0 +1,21 @@ +# Git Object Deduplication demo + +## Script + +- Start with GDK with gitlab-ee master and gitaly master +- separate terminal: `gdk run db` +- `rm -f .gitlab-bundle .gitlab-yarn && make gitlab-update gitaly-update` +- `gdk run app` +- create PUBLIC group parent +- create PUBLIC project in parent group from import: https://gitlab.com/gitlab-org/gitlab-ce.git +- separate terminal: `bundle exec rails console` +- console: `Feature.enable(:object_pools)` +- create group for fork +- fork into new group +- console: `ActiveRecord::Base.logger.level = Logger::INFO` +- console: `def sizes; Project.all.each { |p| printf("%4d %s\n", p.repository.raw.size, p.inspect) };nil; end` +- console: `def pool(id); PoolRepository.find(id); end` +- console: `def show_alt(p) ; system('cat', File.join('../repositories', p.repository.relative_path, 'objects/info/alternates')); end` +- try to break stuff: `PoolRepository.all.each(&:destroy)`. Do projects still work? + + -- GitLab From 395d7c56baff02eb7a4d44e59059319ea921b068 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Thu, 18 Apr 2019 16:21:44 +0200 Subject: [PATCH 2/2] Minor fixes --- doc/demos/dedup.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/demos/dedup.md b/doc/demos/dedup.md index db375819424..71fab649cc4 100644 --- a/doc/demos/dedup.md +++ b/doc/demos/dedup.md @@ -3,12 +3,12 @@ ## Script - Start with GDK with gitlab-ee master and gitaly master -- separate terminal: `gdk run db` +- Separate terminal: `gdk run db` - `rm -f .gitlab-bundle .gitlab-yarn && make gitlab-update gitaly-update` - `gdk run app` - create PUBLIC group parent -- create PUBLIC project in parent group from import: https://gitlab.com/gitlab-org/gitlab-ce.git -- separate terminal: `bundle exec rails console` +- create PUBLIC project in parent group from pushing the local gitlab-ce copy +- separate terminal: `bin/rails console - console: `Feature.enable(:object_pools)` - create group for fork - fork into new group @@ -18,4 +18,3 @@ - console: `def show_alt(p) ; system('cat', File.join('../repositories', p.repository.relative_path, 'objects/info/alternates')); end` - try to break stuff: `PoolRepository.all.each(&:destroy)`. Do projects still work? - -- GitLab