Commit 9fd6c3d591fb56e50a9cdbbaac557383e3ef86a7
Exists in
spb-stable
and in
2 other branches
Merge branch 'huge-repo-improve' into 'master'
Better support for huge repositories This MR contains next improvements to GitLab: * You can see repo commits count even if it is > 100k commits * Prevent 500 for commit page for large repos * Add notice about huge push over http to unicorn config * File action in satellites uses default 30 seconds timeout instead of old 10 seconds one * Show spinner when loading data for network graph
Showing
9 changed files
with
37 additions
and
10 deletions
Show diff stats
CHANGELOG
... | ... | @@ -26,6 +26,11 @@ v 7.0.0 |
26 | 26 | - UI improvements for mobile devices |
27 | 27 | - Improve diff rendering performance |
28 | 28 | - Drag-n-drop for issues and merge requests between states at milestone page |
29 | + - Fix '0 commits' message for huge repositories on project home page | |
30 | + - Prevent 500 error page when visit commit page from large repo | |
31 | + - Add notice about huge push over http to unicorn config | |
32 | + - File action in satellites uses default 30 seconds timeout instead of old 10 seconds one | |
33 | + - Overall performance improvements | |
29 | 34 | |
30 | 35 | v 6.9.2 |
31 | 36 | - Revert the commit that broke the LDAP user filter |
... | ... | @@ -790,4 +795,4 @@ v 0.8.0 |
790 | 795 | - stability |
791 | 796 | - security fixes |
792 | 797 | - increased test coverage |
793 | - - email notification | |
794 | 798 | \ No newline at end of file |
799 | + - email notification | ... | ... |
Gemfile
... | ... | @@ -30,7 +30,7 @@ gem 'omniauth-github' |
30 | 30 | |
31 | 31 | # Extracting information from a git repository |
32 | 32 | # Provide access to Gitlab::Git library |
33 | -gem "gitlab_git", '~> 5.8' | |
33 | +gem "gitlab_git", '~> 6.0' | |
34 | 34 | |
35 | 35 | # Ruby/Rack Git Smart-HTTP Server Handler |
36 | 36 | gem 'gitlab-grack', '~> 2.0.0.pre', require: 'grack' | ... | ... |
Gemfile.lock
... | ... | @@ -175,7 +175,7 @@ GEM |
175 | 175 | mime-types (~> 1.19) |
176 | 176 | gitlab_emoji (0.0.1.1) |
177 | 177 | emoji (~> 1.0.1) |
178 | - gitlab_git (5.9.0) | |
178 | + gitlab_git (6.0.0) | |
179 | 179 | activesupport (~> 4.0) |
180 | 180 | charlock_holmes (~> 0.6) |
181 | 181 | gitlab-grit (~> 2.6) |
... | ... | @@ -601,7 +601,7 @@ DEPENDENCIES |
601 | 601 | gitlab-grack (~> 2.0.0.pre) |
602 | 602 | gitlab-linguist (~> 3.0.0) |
603 | 603 | gitlab_emoji (~> 0.0.1.1) |
604 | - gitlab_git (~> 5.8) | |
604 | + gitlab_git (~> 6.0) | |
605 | 605 | gitlab_meta (= 6.0) |
606 | 606 | gitlab_omniauth-ldap (= 1.0.4) |
607 | 607 | gollum-lib (~> 3.0.0) | ... | ... |
app/controllers/projects/commit_controller.rb
... | ... | @@ -12,7 +12,12 @@ class Projects::CommitController < Projects::ApplicationController |
12 | 12 | return git_not_found! unless @commit |
13 | 13 | |
14 | 14 | @line_notes = project.notes.for_commit_id(commit.id).inline |
15 | - @branches = project.repository.branch_names_contains(commit.id) | |
15 | + | |
16 | + @branches = begin | |
17 | + project.repository.branch_names_contains(commit.id) | |
18 | + rescue Grit::Git::GitTimeout | |
19 | + [] | |
20 | + end | |
16 | 21 | |
17 | 22 | begin |
18 | 23 | @suppress_diff = true if commit.diff_suppress? && !params[:force_show_diff] | ... | ... |
app/helpers/application_helper.rb
... | ... | @@ -226,8 +226,11 @@ module ApplicationHelper |
226 | 226 | GitHub::Markup.render(file_name, file_content).html_safe |
227 | 227 | end |
228 | 228 | |
229 | - def spinner(text = nil) | |
230 | - content_tag :div, class: 'loading hide' do | |
229 | + def spinner(text = nil, visible = false) | |
230 | + css_class = "loading" | |
231 | + css_class << " hide" unless visible | |
232 | + | |
233 | + content_tag :div, class: css_class do | |
231 | 234 | content_tag(:i, nil, class: 'icon-spinner icon-spin') + text |
232 | 235 | end |
233 | 236 | end | ... | ... |
app/models/repository.rb
app/views/projects/network/show.html.haml
config/unicorn.rb.example
... | ... | @@ -34,6 +34,20 @@ listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64 |
34 | 34 | listen "127.0.0.1:8080", :tcp_nopush => true |
35 | 35 | |
36 | 36 | # nuke workers after 30 seconds instead of 60 seconds (the default) |
37 | +# | |
38 | +# NOTICE: git push over http depends on this value. | |
39 | +# If you want be able to push huge amount of data to git repository over http | |
40 | +# you will have to increase this value too. | |
41 | +# | |
42 | +# Example of output if you try to push 1GB repo to GitLab over http. | |
43 | +# -> git push http://gitlab.... master | |
44 | +# | |
45 | +# error: RPC failed; result=18, HTTP code = 200 | |
46 | +# fatal: The remote end hung up unexpectedly | |
47 | +# fatal: The remote end hung up unexpectedly | |
48 | +# | |
49 | +# For more information see http://stackoverflow.com/a/21682112/752049 | |
50 | +# | |
37 | 51 | timeout 30 |
38 | 52 | |
39 | 53 | # feel free to point this anywhere accessible on the filesystem | ... | ... |
lib/gitlab/satellite/files/file_action.rb