- 14 9月, 2017 2 次提交
-
-
由 Jacob Vosmaer 提交于
-
由 Jarka Kadlecova 提交于
This method was moved to ::Git but it is not cached there which causes performance problems
-
- 13 9月, 2017 7 次提交
-
-
由 Yorick Peterse 提交于
When querying the deployments of an environment the query Rails produces will be along the lines of the following: SELECT * FROM deployments WHERE environment_id = X For queries such as this (or queries that use this as their base and add more conditions) there is no meaningful index that can be used as long as deployments.project_id is not part of a WHERE clause. To work around this we change that "has_many :deployments" relation to always add a "WHERE project_id = X" condition. This means that queries filtering deployments can make better use of the existing indexes. For example, when filtering by deployments.iid this will result in the following query: SELECT * FROM deployments WHERE environment_id = X AND project_id = Y AND iid = Z This means PostgreSQL can use the existing index on (project_id, environment_id, iid) instead of having to use a different index (or none at all) and having to scan over a large amount of data. Query plan wise this means that instead of this query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..14465.75 rows=1 width=117) (actual time=6.394..38.048 rows=1 loops=1) Index Cond: (iid = 225) Filter: (environment_id = 5) Rows Removed by Filter: 839 Buffers: shared hit=4534 Planning time: 0.076 ms Execution time: 38.073 ms We produce the following query and plan: EXPLAIN (BUFFERS, ANALYZE) SELECT deployments.* FROM deployments WHERE deployments.environment_id = 5 AND deployments.iid = 225 AND deployments.project_id = 1292351; Index Scan using index_deployments_on_project_id_and_iid on deployments (cost=0.42..4.45 rows=1 width=117) (actual time=0.018..0.018 rows=1 loops=1) Index Cond: ((project_id = 1292351) AND (iid = 225)) Filter: (environment_id = 5) Buffers: shared hit=4 Planning time: 0.088 ms Execution time: 0.039 ms On GitLab.com these changes result in a (roughly) 11x improvement in SQL timings for the CI environment status endpoint. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877
-
由 Lin Jen-Shin 提交于
Before this fix, I don't know if those emails would work having newlines in them.
-
由 micael.bergeron 提交于
added a QueryRecorder for IssuesController#index.json
-
由 Maxim Rydkin 提交于
-
由 Maxim Rydkin 提交于
-
由 Maxim Rydkin 提交于
-
由 Maxim Rydkin 提交于
-
- 12 9月, 2017 1 次提交
-
-
由 Zeger-Jan van de Weg 提交于
-
- 11 9月, 2017 3 次提交
-
-
由 Annabel Dunstone Gray 提交于
This reverts merge request !14148
-
由 Alex Lossent 提交于
This enables skipping a lesser housekeeping task (incremental or full repack) by consistently scheduling a higher task (respectively full repack or gc) with the same period. Cf. #34981
-
由 Shinichi Maeshima 提交于
-
- 09 9月, 2017 1 次提交
-
-
由 Visay Keo 提交于
-
- 08 9月, 2017 3 次提交
-
-
由 Rubén Dávila 提交于
Revert "Merge branch '35012-navigation-add-option-to-change-navigation-color-palette' into 'master'" This reverts merge request !13619
-
由 Kamil Trzciński 提交于
Do not use `location.pathname` when accessing environments folders See merge request !2147
-
由 Yorick Peterse 提交于
Whenever you push to a branch GitLab will show a button to create a merge request (should one not exist already). The underlying code to display this data was quite inefficient. For example, it involved multiple slow queries just to figure out what the most recent push event was. This commit changes the way this data is retrieved so it's much faster. This is achieved by caching the ID of the last push event on every push, which is then retrieved when loading certain pages. Database queries are only executed if necessary and the cached data is removed automatically once a merge request has been created, or 2 hours after being stored. A trade-off of this approach is that we _only_ track the last event. Previously if you were to push to branch A and B then create a merge request for branch B we'd still show the widget for branch A. As of this commit this is no longer the case, instead we will only show the widget for the branch you pushed to most recently. Once a merge request exists the widget is no longer displayed. Alternative solutions are either too complex and/or too slow, hence the decision was made to settle for this trade-off. Performance Impact ------------------ In the best case scenario (= a user didn't push anything for more than 2 hours) we perform a single Redis GET per page. Should there be cached data we will run a single (and lightweight) SQL query to get the event data from the database. If a merge request already exists we will run an additional DEL to remove the cache key. The difference in response timings can vary a bit per project. On GitLab.com the 99th percentile of time spent in User#recent_push hovers between 100 milliseconds and 1 second, while the mean hovers around 50 milliseconds. With the changes in this MR the expected time spent in User#recent_push is expected to be reduced down to just a few milliseconds. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/35990
-
- 07 9月, 2017 9 次提交
-
-
由 Kamil Trzcinski 提交于
-
由 Tiago Botelho 提交于
-
由 Michael Kozono 提交于
-
由 Michael Kozono 提交于
…when needed
-
由 Kamil Trzcinski 提交于
-
由 Rubén Dávila 提交于
-
由 Kamil Trzcinski 提交于
-
由 Kamil Trzcinski 提交于
-
由 Felipe Artur 提交于
-
- 06 9月, 2017 14 次提交
-
-
由 Shinya Maeda 提交于
-
由 Shinya Maeda 提交于
-
由 Yorick Peterse 提交于
This finishes the procedure for migrating events from the old format into the new format. Code no longer uses the old setup and the database tables used during the migration process are swapped, with the old table being dropped. While the database migration can be reversed this will 1) take a lot of time as data has to be coped around 2) won't restore data in the "events.data" column as we have no way of restoring this. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/37241
-
由 Tiago Botelho 提交于
-
由 Shinya Maeda 提交于
-
由 Shinya Maeda 提交于
-
由 Alexander Keramidas 提交于
-
由 Zeger-Jan van de Weg 提交于
-
由 micael.bergeron 提交于
also fix some code styling issues
-
由 micael.bergeron 提交于
- only show in merge-requests - show as a little glyph
-
由 micael.bergeron 提交于
-
由 micael.bergeron 提交于
this will remove the need make N queries (per-note) at the cost of having to mark notes with an attribute this opens up the possibility for other special roles for notes
-
由 Sean McGivern 提交于
-
由 Sean McGivern 提交于
-