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
0b408bec
Commit
0b408bec
authored
Mar 24, 2021
by
Heinrich Lee Yu
Committed by
Jan Provaznik
Mar 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove CTE ordering in shared runners query
We don't need a specific order when looking for the root ancestors
parent
77dd6c63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
+7
-2
ee/app/services/ee/ci/register_job_service.rb
ee/app/services/ee/ci/register_job_service.rb
+1
-1
ee/changelogs/unreleased/325725-skip-ordering-for-ci-shared-runners-cte-query.yml
.../325725-skip-ordering-for-ci-shared-runners-cte-query.yml
+5
-0
lib/gitlab/object_hierarchy.rb
lib/gitlab/object_hierarchy.rb
+1
-1
No files found.
ee/app/services/ee/ci/register_job_service.rb
View file @
0b408bec
...
...
@@ -75,7 +75,7 @@ module EE
# rubocop: disable CodeReuse/ActiveRecord
def
all_namespaces
namespaces
=
::
Namespace
.
reorder
(
nil
).
where
(
'namespaces.id = projects.namespace_id'
)
::
Gitlab
::
ObjectHierarchy
.
new
(
namespaces
).
roots
::
Gitlab
::
ObjectHierarchy
.
new
(
namespaces
,
options:
{
skip_ordering:
true
}
).
roots
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
ee/changelogs/unreleased/325725-skip-ordering-for-ci-shared-runners-cte-query.yml
0 → 100644
View file @
0b408bec
---
title
:
Skip ordering when using distinct in shared runners CTE query
merge_request
:
57312
author
:
type
:
performance
lib/gitlab/object_hierarchy.rb
View file @
0b408bec
...
...
@@ -191,7 +191,7 @@ module Gitlab
def
skip_ordering?
return
options
[
:skip_ordering
]
if
options
.
key?
(
:skip_ordering
)
tru
e
fals
e
end
# Remove the extra `depth` field using an INNER JOIN to avoid breaking UNION queries
...
...
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