<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/services/users, branch docs/db-debugging</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>Only cache the event for the fork-source when it exists</title>
<updated>2017-10-22T17:24:47+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2017-10-22T17:16:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6f5ebc4bae8524585b5377d3056664730e0e1381'/>
<id>6f5ebc4bae8524585b5377d3056664730e0e1381</id>
<content type='text'>
It is possible for a fork not to have a source anymore, in this case
we don't need to keep track of the push event.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible for a fork not to have a source anymore, in this case
we don't need to keep track of the push event.
</pre>
</div>
</content>
</entry>
<entry>
<title>Create idea of read-only database</title>
<updated>2017-10-06T20:37:40+00:00</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2017-09-19T07:44:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d13669716ab0c31ce9039ae9f7f073e33a4dc40f'/>
<id>d13669716ab0c31ce9039ae9f7f073e33a4dc40f</id>
<content type='text'>
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In GitLab EE, a GitLab instance can be read-only (e.g. when it's a Geo
secondary node). But in GitLab CE it also might be useful to have the
"read-only" idea around. So port it back to GitLab CE.

Also having the principle of read-only in GitLab CE would hopefully
lead to less errors introduced, doing write operations when there
aren't allowed for read-only calls.

Closes gitlab-org/gitlab-ce#37534.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor users update service</title>
<updated>2017-09-28T06:46:39+00:00</updated>
<author>
<name>James Lopez</name>
<email>james@jameslopez.es</email>
</author>
<published>2017-09-27T09:48:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=67d06dee30379fc93be196e2cf509660d1661aea'/>
<id>67d06dee30379fc93be196e2cf509660d1661aea</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix specs</title>
<updated>2017-09-28T06:46:39+00:00</updated>
<author>
<name>James Lopez</name>
<email>james@jameslopez.es</email>
</author>
<published>2017-09-20T11:36:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f2e9ef102713344938e425d68d1a017403a710e0'/>
<id>f2e9ef102713344938e425d68d1a017403a710e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rework how recent push events are retrieved</title>
<updated>2017-09-07T22:46:16+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2017-09-01T10:50:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=83355336dd405a3af9914a6ae6d397a631847e49'/>
<id>83355336dd405a3af9914a6ae6d397a631847e49</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Fire system hooks when a user is created via LDAP or OAuth</title>
<updated>2017-08-26T05:00:07+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2017-08-25T23:15:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e94a2fde0dbb1802ad3e01486c2c8f6d8a3ee4da'/>
<id>e94a2fde0dbb1802ad3e01486c2c8f6d8a3ee4da</id>
<content type='text'>
Closes #37073
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #37073
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure repository's removal work for legacy and hashed storages</title>
<updated>2017-08-22T04:33:20+00:00</updated>
<author>
<name>Gabriel Mazetto</name>
<email>brodock@gmail.com</email>
</author>
<published>2017-08-21T13:28:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fb9e059a412d95ee3b7442a472ecfd9c67eafd7b'/>
<id>fb9e059a412d95ee3b7442a472ecfd9c67eafd7b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add namespace errors from User#after_update</title>
<updated>2017-08-18T17:31:59+00:00</updated>
<author>
<name>Michael Kozono</name>
<email>mkozono@gmail.com</email>
</author>
<published>2017-08-18T17:31:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=bd578d96b47c9fadd91fa95a7913bf65f3623128'/>
<id>bd578d96b47c9fadd91fa95a7913bf65f3623128</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change all `:empty_project` to `:project`</title>
<updated>2017-08-02T21:47:31+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2017-08-02T19:55:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=72a7b30c9f363063449b28aa9efc3a26a1752f9f'/>
<id>72a7b30c9f363063449b28aa9efc3a26a1752f9f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure all project factories use `:repository` trait or `:empty_project`</title>
<updated>2017-08-01T18:51:52+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2017-08-01T18:51:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=9513bd18c43b749c8856d6ad89635d97c8fb73b5'/>
<id>9513bd18c43b749c8856d6ad89635d97c8fb73b5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
