Skip to content
代码片段 群组 项目
提交 ca88c88a 编辑于 作者: Terri Chu's avatar Terri Chu 提交者: Dmitry Gruzd
浏览文件

Use new indexer version, log errors to elasticsearch.log

上级 83a62a42
No related branches found
No related tags found
无相关合并请求
3.0.1 3.0.2
...@@ -166,7 +166,7 @@ may need to set the `production -> elasticsearch -> indexer_path` setting in you ...@@ -166,7 +166,7 @@ may need to set the `production -> elasticsearch -> indexer_path` setting in you
### View indexing errors ### View indexing errors
Errors from the [GitLab Elasticsearch Indexer](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer) are reported in Errors from the [GitLab Elasticsearch Indexer](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer) are reported in
the [`sidekiq.log`](../../administration/logs/index.md#sidekiqlog) file with a `json.exception.class` of `Gitlab::Elastic::Indexer::Error`. the [`elasticsearch.log`](../../administration/logs/index.md#elasticsearchlog) file and the [`sidekiq.log`](../../administration/logs/index.md#sidekiqlog) file with a `json.exception.class` of `Gitlab::Elastic::Indexer::Error`.
These errors may occur when indexing Git repository data. These errors may occur when indexing Git repository data.
## Enable Advanced Search ## Enable Advanced Search
......
...@@ -103,7 +103,23 @@ def run_indexer!(base_sha, to_sha, target) ...@@ -103,7 +103,23 @@ def run_indexer!(base_sha, to_sha, target)
output, status = Gitlab::Popen.popen(command, nil, vars) output, status = Gitlab::Popen.popen(command, nil, vars)
raise Error, output unless status&.zero? return unless status.present?
payload = {
message: output,
status: status,
project_id: project.id,
from_sha: base_sha,
to_sha: to_sha,
index_wiki: index_wiki?
}
if status == 0
logger.info(payload)
else
logger.error(payload)
raise Error, output
end
end end
# Remove all indexed data for commits and blobs for a project. # Remove all indexed data for commits and blobs for a project.
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册