Commit Graph

15 Commits

Author SHA1 Message Date
GitLab Bot e5e0589e09 Add latest changes from gitlab-org/gitlab@master 2021-04-26 12:09:44 +00:00
GitLab Bot 442a79b733 Add latest changes from gitlab-org/gitlab@master 2021-01-19 12:10:46 +00:00
GitLab Bot e7bc93852d Add latest changes from gitlab-org/gitlab@master 2020-05-21 21:08:31 +00:00
dineshpanda 20111b045d Avoid calling freeze on already frozen strings in app/models 2019-09-01 01:27:00 +05:30
Reuben Pereira af4a597d3f Save instance administration project id in DB
- This will make it easy to identify the project even if admins change
the name of the project or move it.
2019-08-07 18:40:36 +00:00
Mayra Cabrera 0ab89d8e36 Add a rubocop for Rails.logger
Suggests to use a JSON structured log instead

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/54102
2019-07-10 19:26:47 +00:00
Stan Hu 978647c6cb Add a memory cache local to the thread to reduce Redis load
Loading `ApplicationSetting` from Redis was responsible for at least 50%
of the CPU load of the Redis cluster on GitLab.com. Since these values
generally don't change very much, we can load this from the database and
cache it in memory, skipping Redis altogther. We use
`ActiveSupport::Cache::MemoryStore` as a drop-in replacement for
`RedisCacheStore` even though we probably don't need synchronized access
within `Thread.current`.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/63977
2019-07-01 22:23:01 -07:00
Lin Jen-Shin cc5099c5ce
Move schema aware defaults to build_from_defaults
This way we can reuse the safe setting
2018-12-19 11:24:54 +01:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Michael Kozono f107bc69e3 Simplify by using Gitlab::SafeRequestStore
These are clear wins.
2018-09-24 12:11:26 -07:00
gfyoung 15b878e27e Enable more frozen string in app/models/**/*.rb
Partially addresses #47424.
2018-08-07 00:37:36 -07:00
Rémy Coutable f349f2a68c
Stop relying on migrations in the CacheableAttributes cache key and cache attributes for 1 minute instead
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-07-05 12:34:15 +02:00
Rémy Coutable 4eda09e3fb
Use RequestStore in CacheableAttributes.cached for greater performance
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-01 14:01:27 +02:00
Rémy Coutable a886532cc0
Revert to caching the AR object in CacheableAttributes
Caching the attributes as JSON and manually instantiating the record
ended-up very complex since the edge-cases such as upload fields,
serialized fields, and fields with custom accessors had to be handled.

To ensure 3 points out of 4 are checked from https://gitlab.com/gitlab-org/gitlab-ce/issues/45175
we now include the Rails version in the cache key.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-06-01 13:58:42 +02:00
Rémy Coutable 02f17a0988
Introduce a new CacheableAttributes concern
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-23 16:14:43 +02:00