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
7415574f
Commit
7415574f
authored
Jun 24, 2021
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Exclude temporary indexes from reindexing
parent
8fd2496a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
lib/gitlab/database/reindexing.rb
lib/gitlab/database/reindexing.rb
+1
-0
spec/lib/gitlab/database/reindexing_spec.rb
spec/lib/gitlab/database/reindexing_spec.rb
+1
-1
No files found.
lib/gitlab/database/reindexing.rb
View file @
7415574f
...
...
@@ -19,6 +19,7 @@ module Gitlab
.
where
(
'NOT expression'
)
.
not_match
(
"^
#{
ConcurrentReindex
::
TEMPORARY_INDEX_PREFIX
}
"
)
.
not_match
(
"^
#{
ConcurrentReindex
::
REPLACED_INDEX_PREFIX
}
"
)
.
not_match
(
"
#{
ReindexConcurrently
::
TEMPORARY_INDEX_PATTERN
}
$"
)
end
end
end
...
...
spec/lib/gitlab/database/reindexing_spec.rb
View file @
7415574f
...
...
@@ -31,7 +31,7 @@ RSpec.describe Gitlab::Database::Reindexing do
it
'retrieves regular indexes that are no left-overs from previous runs'
do
result
=
double
expect
(
Gitlab
::
Database
::
PostgresIndex
).
to
receive_message_chain
(
'regular.where.not_match.not_match
'
).
with
(
no_args
).
with
(
'NOT expression'
).
with
(
'^tmp_reindex_'
).
with
(
'^old_reindex_
'
).
and_return
(
result
)
expect
(
Gitlab
::
Database
::
PostgresIndex
).
to
receive_message_chain
(
'regular.where.not_match.not_match
.not_match'
).
with
(
no_args
).
with
(
'NOT expression'
).
with
(
'^tmp_reindex_'
).
with
(
'^old_reindex_'
).
with
(
'\_ccnew[0-9]*$
'
).
and_return
(
result
)
expect
(
subject
).
to
eq
(
result
)
end
...
...
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