summaryrefslogtreecommitdiff
path: root/spec/models/lfs_object_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-11-081-0/+12
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-091-0/+11
|
* Add latest changes from gitlab-org/gitlab@masterGitLab Bot2019-10-011-0/+40
|
* CE backport for changes in EE MR 138949490-record-repository_type-on-lfs_objects_projects-ceLuke Duncalfe2019-06-171-0/+14
| | | | | | | | | | | | | | | | | | | | This backports to CE changes that allow the recording of the repository_type in the table lfs_objects_projects. This is in order to allow future pruning of unreferenced LFS objects, as we will need to know which repository to look in for the LFS pointer file. The EE MR that contains the original code and a full explanation of the changes is https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894 EE Issue https://gitlab.com/gitlab-org/gitlab-ee/issues/9490 Note that there was a lot of CE code changed in the EE MR because we want to allow the wiki repository to also use LFS. See https://gitlab.com/gitlab-org/gitlab-ce/issues/43721. As the wiki is an unlicensed feature, a full backport is required to enable this.
* Add # frozen_string_literal to spec/modelsThong Kuah2019-04-011-0/+2
| | | | Adds `# frozen_string_literal: true` to spec/models ruby files
* Merge branch 'gt-update-typos-in-comments-and-specs' into 'master'Achilleas Pipinellis2018-11-011-1/+1
|\ | | | | | | | | Fix typos in comments and specs See merge request gitlab-org/gitlab-ce!22683
| * Fix typos in comments and specsGeorge Tsiolis2018-11-011-1/+1
| |
* | Enhance performance of counting local LFS objectstc-index-lfs-objects-file-storeToon Claes2018-10-301-19/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an index to the `file_store` column on `lfs_objects`. This makes counting local objects faster. Also, there is no longer need to check for objects with `file_store` being `NULL`. See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18557 --- ### Query plans #### Before & with `NULL` ``` Aggregate (cost=113495.96..113495.97 rows=1 width=8) (actual time=1691.394..1691.394 rows=1 loops=1) -> Seq Scan on lfs_objects (cost=0.00..106415.50 rows=2832186 width=0) (actual time=0.012..1312.488 rows=2852607 loops=1) Filter: ((file_store = 1) OR (file_store IS NULL)) Rows Removed by Filter: 131 Planning time: 0.077 ms Execution time: 1691.433 ms ``` #### Before, without `NULL` ``` Aggregate (cost=113495.96..113495.97 rows=1 width=8) (actual time=856.423..856.424 rows=1 loops=1) -> Seq Scan on lfs_objects (cost=0.00..106415.50 rows=2832186 width=0) (actual time=0.012..672.181 rows=2852607 loops=1) Filter: (file_store = 1) Rows Removed by Filter: 131 Planning time: 0.128 ms Execution time: 856.470 ms ``` #### After & with `NULL` ``` Aggregate (cost=68819.95..68819.96 rows=1 width=8) (actual time=583.355..583.355 rows=1 loops=1) -> Index Only Scan using index_lfs_objects_on_file_store on lfs_objects (cost=0.43..61688.35 rows=2852643 width=0) (actual time=0.028..399.177 rows=2852607 loops=1) Filter: ((file_store = 1) OR (file_store IS NULL)) Rows Removed by Filter: 131 Heap Fetches: 867 Planning time: 0.096 ms Execution time: 583.404 ms ``` #### After, without `NULL` ``` Aggregate (cost=68817.29..68817.30 rows=1 width=8) (actual time=490.550..490.551 rows=1 loops=1) -> Index Only Scan using index_lfs_objects_on_file_store on lfs_objects (cost=0.43..61685.68 rows=2852643 width=0) (actual time=0.040..311.760 rows=2852607 loops=1) Index Cond: (file_store = 1) Heap Fetches: 831 Planning time: 0.294 ms Execution time: 490.590 ms ``` Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6067
* Fix file_store for artifacts and lfs when savingKamil Trzciński2018-05-011-3/+1
|
* Fix direct_upload when records with null file_store are usedKamil Trzciński2018-04-191-0/+39
| | | | | | | | Old records have a null value of file_store column. This causes the problems with current direct_upload implementation, as this makes it to choose Store::REMOTE instead of Store::LOCAL. This change moves the store save when change saving the object.
* remove the license checkMicaël Bergeron2018-03-011-25/+0
|
* Merge branch 'fix/sm/atomic-migration' into 'master'Micaël Bergeron2018-03-011-0/+110
Fix migrate! method (Minimal fix with ExclusiveLock to prevent race conditions) Closes #4928 and #4980 See merge request gitlab-org/gitlab-ee!4624