<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/upload.rb, branch update-docs-spotbugs-java-11</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Externalize strings in app/models</title>
<updated>2019-04-12T12:28:07+00:00</updated>
<author>
<name>Martin Wortschack</name>
<email>mwortschack@gitlab.com</email>
</author>
<published>2019-04-12T12:28:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=cd6f77409359de53c20c99c5d291ada3545d9d28'/>
<id>cd6f77409359de53c20c99c5d291ada3545d9d28</id>
<content type='text'>
- Update PO file
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Update PO file
</pre>
</div>
</content>
</entry>
<entry>
<title>Inherit from ApplicationRecord instead of ActiveRecord::Base</title>
<updated>2019-03-28T16:18:23+00:00</updated>
<author>
<name>Nick Thomas</name>
<email>nick@gitlab.com</email>
</author>
<published>2019-03-28T13:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=013f7cd24c4359d5d704b719d85b6df7ca1fdd55'/>
<id>013f7cd24c4359d5d704b719d85b6df7ca1fdd55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use FastDestroy for deleting uploads</title>
<updated>2018-12-06T21:00:19+00:00</updated>
<author>
<name>Jan Provaznik</name>
<email>jprovaznik@gitlab.com</email>
</author>
<published>2018-10-07T18:31:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=239fdc78b1ced1861cdcf00b8927963e30ef2095'/>
<id>239fdc78b1ced1861cdcf00b8927963e30ef2095</id>
<content type='text'>
It gathers list of file paths to delete before destroying
the parent object. Then after the parent_object is destroyed
these paths are scheduled for deletion asynchronously.

Carrierwave needed associated model for deleting upload file.
To avoid this requirement, simple Fog/File layer is used directly
for file deletion, this allows us to use just a simple list of paths.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It gathers list of file paths to delete before destroying
the parent object. Then after the parent_object is destroyed
these paths are scheduled for deletion asynchronously.

Carrierwave needed associated model for deleting upload file.
To avoid this requirement, simple Fog/File layer is used directly
for file deletion, this allows us to use just a simple list of paths.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport changes from EE</title>
<updated>2018-11-07T10:29:31+00:00</updated>
<author>
<name>Toon Claes</name>
<email>toon@gitlab.com</email>
</author>
<published>2018-10-30T10:56:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=149b63272202d78566af59db192c668a8803c910'/>
<id>149b63272202d78566af59db192c668a8803c910</id>
<content type='text'>
Now the files are identical again compared to EE.

These are backported from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5050
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now the files are identical again compared to EE.

These are backported from
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5050
</pre>
</div>
</content>
</entry>
<entry>
<title>Enhance performance of counting local Uploads</title>
<updated>2018-11-07T10:29:31+00:00</updated>
<author>
<name>Toon Claes</name>
<email>toon@gitlab.com</email>
</author>
<published>2018-10-05T13:59:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1c481b7aacdc7e90d0f349dc8e848adaf0813c65'/>
<id>1c481b7aacdc7e90d0f349dc8e848adaf0813c65</id>
<content type='text'>
Add an index to the `store` column on `uploads`. This makes counting
local uploads faster.

Also, there is no longer need to check for objects with `store = NULL`.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18557

---

### Query plans

Query:

```sql
SELECT COUNT(*)
FROM "uploads"
WHERE ("uploads"."store" = ? OR "uploads"."store" IS NULL)
```

#### Without index

```
gitlabhq_production=# EXPLAIN ANALYZE SELECT uploads.* FROM uploads WHERE (uploads.store = 1 OR uploads.store IS NULL);
                                                  QUERY PLAN
---------------------------------------------------------------------------------------------------------------
 Seq Scan on uploads  (cost=0.00..601729.54 rows=578 width=272) (actual time=6.170..2308.256 rows=545 loops=1)
   Filter: ((store = 1) OR (store IS NULL))
   Rows Removed by Filter: 4411957
 Planning time: 38.652 ms
 Execution time: 2308.454 ms
(5 rows)
```

#### Add index

```
gitlabhq_production=# create index uploads_tmp1 on uploads (store);
CREATE INDEX
```

#### With index

```
gitlabhq_production=# EXPLAIN ANALYZE SELECT uploads.* FROM uploads WHERE (uploads.store = 1 OR uploads.store IS NULL);
                                                          QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on uploads  (cost=11.46..1238.88 rows=574 width=272) (actual time=0.155..0.577 rows=545 loops=1)
   Recheck Cond: ((store = 1) OR (store IS NULL))
   Heap Blocks: exact=217
   -&gt;  BitmapOr  (cost=11.46..11.46 rows=574 width=0) (actual time=0.116..0.116 rows=0 loops=1)
         -&gt;  Bitmap Index Scan on uploads_tmp1  (cost=0.00..8.74 rows=574 width=0) (actual time=0.095..0.095 rows=545 loops=1)
               Index Cond: (store = 1)
         -&gt;  Bitmap Index Scan on uploads_tmp1  (cost=0.00..2.44 rows=1 width=0) (actual time=0.020..0.020 rows=0 loops=1)
               Index Cond: (store IS NULL)
 Planning time: 0.274 ms
 Execution time: 0.637 ms
(10 rows)
```

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6070
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an index to the `store` column on `uploads`. This makes counting
local uploads faster.

Also, there is no longer need to check for objects with `store = NULL`.
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18557

---

### Query plans

Query:

```sql
SELECT COUNT(*)
FROM "uploads"
WHERE ("uploads"."store" = ? OR "uploads"."store" IS NULL)
```

#### Without index

```
gitlabhq_production=# EXPLAIN ANALYZE SELECT uploads.* FROM uploads WHERE (uploads.store = 1 OR uploads.store IS NULL);
                                                  QUERY PLAN
---------------------------------------------------------------------------------------------------------------
 Seq Scan on uploads  (cost=0.00..601729.54 rows=578 width=272) (actual time=6.170..2308.256 rows=545 loops=1)
   Filter: ((store = 1) OR (store IS NULL))
   Rows Removed by Filter: 4411957
 Planning time: 38.652 ms
 Execution time: 2308.454 ms
(5 rows)
```

#### Add index

```
gitlabhq_production=# create index uploads_tmp1 on uploads (store);
CREATE INDEX
```

#### With index

```
gitlabhq_production=# EXPLAIN ANALYZE SELECT uploads.* FROM uploads WHERE (uploads.store = 1 OR uploads.store IS NULL);
                                                          QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------
 Bitmap Heap Scan on uploads  (cost=11.46..1238.88 rows=574 width=272) (actual time=0.155..0.577 rows=545 loops=1)
   Recheck Cond: ((store = 1) OR (store IS NULL))
   Heap Blocks: exact=217
   -&gt;  BitmapOr  (cost=11.46..11.46 rows=574 width=0) (actual time=0.116..0.116 rows=0 loops=1)
         -&gt;  Bitmap Index Scan on uploads_tmp1  (cost=0.00..8.74 rows=574 width=0) (actual time=0.095..0.095 rows=545 loops=1)
               Index Cond: (store = 1)
         -&gt;  Bitmap Index Scan on uploads_tmp1  (cost=0.00..2.44 rows=1 width=0) (actual time=0.020..0.020 rows=0 loops=1)
               Index Cond: (store IS NULL)
 Planning time: 0.274 ms
 Execution time: 0.637 ms
(10 rows)
```

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/6070
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable frozen string in app/models/*.rb</title>
<updated>2018-07-26T23:55:41+00:00</updated>
<author>
<name>gfyoung</name>
<email>gfyoung17@gmail.com</email>
</author>
<published>2018-07-25T09:30:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=50abbd3e53d4f5e3e67543650a13aca9a54b37c2'/>
<id>50abbd3e53d4f5e3e67543650a13aca9a54b37c2</id>
<content type='text'>
Partially addresses #47424.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially addresses #47424.
</pre>
</div>
</content>
</entry>
<entry>
<title>remove EE-only code</title>
<updated>2018-03-22T17:00:58+00:00</updated>
<author>
<name>Micaël Bergeron</name>
<email>mbergeron@gitlab.com</email>
</author>
<published>2018-03-22T17:00:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3b69e41018e48af6aa11512f3809e7d1fa43e7e4'/>
<id>3b69e41018e48af6aa11512f3809e7d1fa43e7e4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport ee-40781-os-to-ce</title>
<updated>2018-03-22T12:49:04+00:00</updated>
<author>
<name>Micaël Bergeron</name>
<email>mbergeron@gitlab.com</email>
</author>
<published>2018-03-09T15:09:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=44f37504fb229ab78606a5fd11f75316ebc2667b'/>
<id>44f37504fb229ab78606a5fd11f75316ebc2667b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>port the object storage to CE</title>
<updated>2018-03-01T15:34:30+00:00</updated>
<author>
<name>Micaël Bergeron</name>
<email>mbergeron@gitlab.com</email>
</author>
<published>2018-02-21T16:43:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0f1d348d683fdef6c36c3b244c85e59f582ff886'/>
<id>0f1d348d683fdef6c36c3b244c85e59f582ff886</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge commit '7e424eb852716495073881710e8a8851b4a4cd5a' into object-storage-ee-to-ce-backport</title>
<updated>2018-02-28T20:14:25+00:00</updated>
<author>
<name>Kamil Trzciński</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2018-02-28T20:14:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=79a5e7fb539dc6df7de590efb69fb9ab9d4614eb'/>
<id>79a5e7fb539dc6df7de590efb69fb9ab9d4614eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
