Commit 934f43ca authored by Ahmad Sherif's avatar Ahmad Sherif

Log indexing overall progress

parent b44b27ef
...@@ -6,6 +6,7 @@ v 8.12.0 (Unreleased) ...@@ -6,6 +6,7 @@ v 8.12.0 (Unreleased)
- [ES] Instrument other Gitlab::Elastic classes - [ES] Instrument other Gitlab::Elastic classes
- [ES] Fix: Elasticsearch does not find partial matches in project names - [ES] Fix: Elasticsearch does not find partial matches in project names
- [ES] Global code search - [ES] Global code search
- [ES] Improve logging
v 8.11.6 v 8.11.6
- Exclude blocked users from potential MR approvers - Exclude blocked users from potential MR approvers
......
...@@ -108,7 +108,7 @@ gem 'seed-fu', '~> 2.3.5' ...@@ -108,7 +108,7 @@ gem 'seed-fu', '~> 2.3.5'
# Search # Search
gem 'elasticsearch-model' gem 'elasticsearch-model'
gem 'elasticsearch-rails' gem 'elasticsearch-rails'
gem 'gitlab-elasticsearch-git', '~> 1.0.0', require: "elasticsearch/git" gem 'gitlab-elasticsearch-git', '~> 1.0.1', require: "elasticsearch/git"
# Markdown and HTML processing # Markdown and HTML processing
gem 'html-pipeline', '~> 1.11.0' gem 'html-pipeline', '~> 1.11.0'
......
...@@ -283,7 +283,7 @@ GEM ...@@ -283,7 +283,7 @@ GEM
mime-types (>= 1.19) mime-types (>= 1.19)
rugged (>= 0.23.0b) rugged (>= 0.23.0b)
github-markup (1.4.0) github-markup (1.4.0)
gitlab-elasticsearch-git (1.0.0) gitlab-elasticsearch-git (1.0.1)
activemodel (~> 4.2) activemodel (~> 4.2)
activesupport (~> 4.2) activesupport (~> 4.2)
charlock_holmes (~> 0.7) charlock_holmes (~> 0.7)
...@@ -886,7 +886,7 @@ DEPENDENCIES ...@@ -886,7 +886,7 @@ DEPENDENCIES
gemojione (~> 3.0) gemojione (~> 3.0)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
github-markup (~> 1.4) github-markup (~> 1.4)
gitlab-elasticsearch-git (~> 1.0.0) gitlab-elasticsearch-git (~> 1.0.1)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-license (~> 1.0) gitlab-license (~> 1.0)
gitlab_git (~> 10.6.3) gitlab_git (~> 10.6.3)
......
...@@ -57,7 +57,11 @@ params = { from_rev: FROM_SHA, to_rev: TO_SHA }.compact ...@@ -57,7 +57,11 @@ params = { from_rev: FROM_SHA, to_rev: TO_SHA }.compact
LOGGER.info("Indexing commits started") LOGGER.info("Indexing commits started")
timings = Benchmark.measure do timings = Benchmark.measure do
repo.index_commits(params) indexed = 0
repo.index_commits(params) do |batch, total_count|
indexed += batch.length
LOGGER.info("Indexed #{indexed}/#{total_count} commits")
end
end end
LOGGER.info("Commits for #{REPO_PATH} are indexed. Time elapsed: #{timings.real}") LOGGER.info("Commits for #{REPO_PATH} are indexed. Time elapsed: #{timings.real}")
...@@ -65,7 +69,11 @@ LOGGER.info("Commits for #{REPO_PATH} are indexed. Time elapsed: #{timings.real} ...@@ -65,7 +69,11 @@ LOGGER.info("Commits for #{REPO_PATH} are indexed. Time elapsed: #{timings.real}
LOGGER.info("Indexing blobs started") LOGGER.info("Indexing blobs started")
timings = Benchmark.measure do timings = Benchmark.measure do
repo.index_blobs(params) indexed = 0
repo.index_blobs(params) do |batch, total_count|
indexed += batch.length
LOGGER.info("Indexed #{indexed}/#{total_count} blobs")
end
end end
LOGGER.info("Blobs for #{REPO_PATH} are indexed. Time elapsed: #{timings.real}") LOGGER.info("Blobs for #{REPO_PATH} are indexed. Time elapsed: #{timings.real}")
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment