Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9148cb62
Commit
9148cb62
authored
Oct 30, 2020
by
Dmitry Gruzd
Committed by
James Lopez
Oct 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ClusterReindexingService infinite loop
parent
efceaf81
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
ee/app/services/elastic/cluster_reindexing_service.rb
ee/app/services/elastic/cluster_reindexing_service.rb
+4
-0
ee/changelogs/unreleased/257838-fix-cluster-reindexing-service.yml
...logs/unreleased/257838-fix-cluster-reindexing-service.yml
+5
-0
ee/spec/services/elastic/cluster_reindexing_service_spec.rb
ee/spec/services/elastic/cluster_reindexing_service_spec.rb
+7
-0
No files found.
ee/app/services/elastic/cluster_reindexing_service.rb
View file @
9148cb62
...
@@ -100,6 +100,10 @@ module Elastic
...
@@ -100,6 +100,10 @@ module Elastic
end
end
true
true
rescue
Elasticsearch
::
Transport
::
Transport
::
Error
abort_reindexing!
(
"Couldn't load task status"
)
false
end
end
def
compare_documents_count
def
compare_documents_count
...
...
ee/changelogs/unreleased/257838-fix-cluster-reindexing-service.yml
0 → 100644
View file @
9148cb62
---
title
:
Fix Global Search Reindexing when reindexing task is not found
merge_request
:
46224
author
:
type
:
fixed
ee/spec/services/elastic/cluster_reindexing_service_spec.rb
View file @
9148cb62
...
@@ -71,6 +71,13 @@ RSpec.describe Elastic::ClusterReindexingService, :elastic do
...
@@ -71,6 +71,13 @@ RSpec.describe Elastic::ClusterReindexingService, :elastic do
expect
{
subject
.
execute
}.
to
change
{
task
.
reload
.
state
}.
from
(
'reindexing'
).
to
(
'failure'
)
expect
{
subject
.
execute
}.
to
change
{
task
.
reload
.
state
}.
from
(
'reindexing'
).
to
(
'failure'
)
expect
(
task
.
reload
.
error_message
).
to
match
(
/has failed with/
)
expect
(
task
.
reload
.
error_message
).
to
match
(
/has failed with/
)
end
end
it
'errors if task is not found'
do
allow
(
Gitlab
::
Elastic
::
Helper
.
default
).
to
receive
(
:task_status
).
and_raise
(
Elasticsearch
::
Transport
::
Transport
::
Errors
::
NotFound
)
expect
{
subject
.
execute
}.
to
change
{
task
.
reload
.
state
}.
from
(
'reindexing'
).
to
(
'failure'
)
expect
(
task
.
reload
.
error_message
).
to
match
(
/couldn't load task status/i
)
end
end
end
context
'task finishes correctly'
do
context
'task finishes correctly'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment