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
2715fda8
Commit
2715fda8
authored
Jan 04, 2021
by
Tiger Watson
Committed by
Mayra Cabrera
Jan 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Index ci_pipelines on pipeline_schedule_id and id
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/50478
parent
0ee0578a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
2 deletions
+28
-2
app/controllers/projects/pipeline_schedules_controller.rb
app/controllers/projects/pipeline_schedules_controller.rb
+0
-1
changelogs/unreleased/254664-fix-pipeline-schedules-timeouts.yml
...ogs/unreleased/254664-fix-pipeline-schedules-timeouts.yml
+5
-0
db/post_migrate/20201223012231_reindex_ci_pipelines_on_schedule_id_and_id.rb
...01223012231_reindex_ci_pipelines_on_schedule_id_and_id.rb
+21
-0
db/schema_migrations/20201223012231
db/schema_migrations/20201223012231
+1
-0
db/structure.sql
db/structure.sql
+1
-1
No files found.
app/controllers/projects/pipeline_schedules_controller.rb
View file @
2715fda8
...
...
@@ -17,7 +17,6 @@ class Projects::PipelineSchedulesController < Projects::ApplicationController
@scope
=
params
[
:scope
]
@all_schedules
=
Ci
::
PipelineSchedulesFinder
.
new
(
@project
).
execute
@schedules
=
Ci
::
PipelineSchedulesFinder
.
new
(
@project
).
execute
(
scope:
params
[
:scope
])
.
includes
(
:last_pipeline
)
end
# rubocop: enable CodeReuse/ActiveRecord
...
...
changelogs/unreleased/254664-fix-pipeline-schedules-timeouts.yml
0 → 100644
View file @
2715fda8
---
title
:
Index ci_pipelines on pipeline_schedule_id and id
merge_request
:
50478
author
:
type
:
performance
db/post_migrate/20201223012231_reindex_ci_pipelines_on_schedule_id_and_id.rb
0 → 100644
View file @
2715fda8
# frozen_string_literal: true
class
ReindexCiPipelinesOnScheduleIdAndId
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
OLD_INDEX_NAME
=
'index_ci_pipelines_on_pipeline_schedule_id'
NEW_INDEX_NAME
=
'index_ci_pipelines_on_pipeline_schedule_id_and_id'
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_pipelines
,
[
:pipeline_schedule_id
,
:id
],
name:
NEW_INDEX_NAME
remove_concurrent_index_by_name
:ci_pipelines
,
OLD_INDEX_NAME
end
def
down
add_concurrent_index
:ci_pipelines
,
:pipeline_schedule_id
,
name:
OLD_INDEX_NAME
remove_concurrent_index_by_name
:ci_pipelines
,
NEW_INDEX_NAME
end
end
db/schema_migrations/20201223012231
0 → 100644
View file @
2715fda8
e845a6704ac92881926cca56bf7fb01c6252f1fe2b2d94fc9d6548144126d6a5
\ No newline at end of file
db/structure.sql
View file @
2715fda8
...
...
@@ -21088,7 +21088,7 @@ CREATE INDEX index_ci_pipelines_on_external_pull_request_id ON ci_pipelines USIN
CREATE
INDEX
index_ci_pipelines_on_merge_request_id
ON
ci_pipelines
USING
btree
(
merge_request_id
)
WHERE
(
merge_request_id
IS
NOT
NULL
);
CREATE
INDEX
index_ci_pipelines_on_pipeline_schedule_id
ON
ci_pipelines
USING
btree
(
pipeline_schedule_
id
);
CREATE
INDEX
index_ci_pipelines_on_pipeline_schedule_id
_and_id
ON
ci_pipelines
USING
btree
(
pipeline_schedule_id
,
id
);
CREATE
INDEX
index_ci_pipelines_on_project_id_and_id_desc
ON
ci_pipelines
USING
btree
(
project_id
,
id
DESC
);
...
...
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