gitlab-org--gitlab-foss/app/models
Stan Hu f14647fdae Expire project caches once per push instead of once per ref
Previously `ProjectCacheWorker` would be scheduled once per ref, which
would generate unnecessary I/O and load on Sidekiq, especially if many
tags or branches were pushed at once. `ProjectCacheWorker` would expire
three items:

1. Repository size: This only needs to be updated once per push.
2. Commit count: This only needs to be updated if the default branch
   is updated.
3. Project method caches: This only needs to be updated if the default
   branch changes, but only if certain files change (e.g. README,
   CHANGELOG, etc.).

Because the third item requires looking at the actual changes in the
commit deltas, we schedule one `ProjectCacheWorker` to handle the first
two cases, and schedule a separate `ProjectCacheWorker` for the third
case if it is needed. As a result, this brings down the number of
`ProjectCacheWorker` jobs from N to 2.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/52046
2019-08-16 19:53:56 +00:00
..
analytics Migrations for Cycle Analytics backend 2019-08-15 19:19:37 +00:00
application_setting
badges
blob_viewer
ci Merge branch 'mc/feature/pipeline-tracking-config-ce' into 'master' 2019-08-16 14:47:05 +00:00
clusters Fix Arel deprecation warning in clusters_hierarchy 2019-08-16 09:59:25 -07:00
concerns Optimise DAG processing 2019-08-14 11:34:44 +02:00
conversational_development_index
cycle_analytics Add code review remarks 2019-07-23 12:01:39 +02:00
diff_viewer
error_tracking
hooks Refactor SystemHookUrlValidator and specs 2019-08-02 15:39:18 +01:00
identity
issue
members Resolve "MembersFinder contains slow database query with OR conditions" 2019-07-29 22:33:57 +00:00
merge_request
namespace Hardcodes namespaces lease timing value to 1.5h 2019-08-01 15:27:12 +00:00
network
postgresql Fix background migrations failing with unused replication slot 2019-06-25 08:35:29 -07:00
project_services Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
protected_branch
protected_tag
releases
serverless
storage Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
uploads Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
.gitkeep
ability.rb
abuse_report.rb
active_session.rb ActiveSession.cleaned_up_lookup_entries to use Redis#pipelined 2019-08-07 09:32:05 +00:00
appearance.rb
application_record.rb
application_setting.rb Migrates Snowplow backend from EE to CE 2019-08-14 19:21:58 +00:00
application_setting_implementation.rb Migrates Snowplow backend from EE to CE 2019-08-14 19:21:58 +00:00
audit_event.rb
award_emoji.rb
badge.rb
blob.rb
board.rb Move order lambda to list scope 2019-06-27 10:32:51 +12:00
board_group_recent_visit.rb
board_project_recent_visit.rb
broadcast_message.rb Set 2 weeks as the expiration time for the current broadcast message 2019-06-25 19:41:05 -03:00
chat_name.rb
chat_team.rb Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
commit.rb Enable Rubocop Performance/ReverseEach 2019-07-24 14:08:25 -07:00
commit_collection.rb
commit_range.rb
commit_status.rb Optimise DAG processing 2019-08-14 11:34:44 +02:00
commit_status_enums.rb
compare.rb
container_repository.rb Backport of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3809 2019-08-01 20:38:07 +03:00
dashboard_group_milestone.rb Fix bug with closed milestones in dashboard 2019-07-16 15:33:35 -06:00
dashboard_milestone.rb
deploy_key.rb Speed up loading and filtering deploy keys and their projects 2019-08-05 06:42:34 -07:00
deploy_keys_project.rb Speed up loading and filtering deploy keys and their projects 2019-08-05 06:42:34 -07:00
deploy_token.rb Add username to deploy tokens 2019-07-02 18:56:48 +00:00
deployment.rb Remove dead MySQL code 2019-07-23 16:53:03 +01:00
deployment_metrics.rb Removes potentially incorrect, and slow fallback 2019-07-25 16:46:20 +12:00
diff_discussion.rb
diff_note.rb Make diff_refs_match_commit validation reusable 2019-08-01 16:00:36 -05:00
directly_addressed_user.rb
discussion.rb GraphQL support for Notes created in discussions 2019-07-10 12:13:48 +12:00
discussion_note.rb
email.rb Upgrade to Rails 5.2 2019-07-12 10:15:31 +08:00
environment.rb Use separate Kubernetes namespaces per environment 2019-08-07 04:40:29 +00:00
environment_status.rb Add additional test case for Gitaly N+1 for diff files 2019-07-10 16:07:14 +02:00
epic.rb
event.rb
event_collection.rb
external_issue.rb
fork_network.rb
fork_network_member.rb
generic_commit_status.rb
global_label.rb
global_milestone.rb
gpg_key.rb
gpg_key_subkey.rb
gpg_signature.rb
group.rb Add group level container repository endpoints 2019-08-05 20:00:50 +00:00
group_custom_attribute.rb
group_label.rb
group_milestone.rb
guest.rb
identity.rb
import_export_upload.rb
individual_note_discussion.rb
instance_configuration.rb
internal_id.rb
issue.rb Split MR widget into cached and non-cached serializers 2019-08-09 21:01:55 +00:00
issue_assignee.rb
issue_collection.rb
key.rb
label.rb Improve quick action error messages 2019-08-13 00:40:39 +00:00
label_link.rb
label_note.rb Update label note to support scoped labels notes 2019-07-02 13:27:03 +02:00
label_priority.rb
legacy_diff_discussion.rb
legacy_diff_note.rb
lfs_download_object.rb
lfs_file_lock.rb
lfs_object.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
lfs_objects_project.rb CE backport for changes in EE MR 13894 2019-06-17 11:23:06 +12:00
license_template.rb
list.rb Make issue boards importable 2019-08-02 14:35:10 -05:00
member.rb Rename search_invited to search_invite_email 2019-08-09 00:33:42 -07:00
members_preloader.rb
merge_request.rb Only read rebase status from the model 2019-08-15 18:54:08 +00:00
merge_request_assignee.rb
merge_request_diff.rb Add MergeRequestDiff#lines_count convenience method 2019-08-06 11:38:50 +03:00
merge_request_diff_commit.rb
merge_request_diff_file.rb
merge_requests_closing_issues.rb Upgrade to Rails 5.2 2019-07-12 10:15:31 +08:00
milestone.rb Revert "Merge branch '4221-board-milestone-should-persist-any-none-properly-ce' into 'master'" 2019-08-09 09:59:38 +00:00
namespace.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
note.rb Fix first-time contributor notes not rendering 2019-07-31 06:52:11 -07:00
note_diff_file.rb
notification_reason.rb
notification_recipient.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
notification_setting.rb Simplify notification check for participating 2019-06-06 01:34:25 +08:00
oauth_access_grant.rb
oauth_access_token.rb
out_of_context_discussion.rb
pages_domain.rb Validate certificate chain only if it's changed 2019-07-22 15:38:08 +00:00
pages_domain_acme_order.rb Add pages domains acme orders 2019-06-06 18:55:31 +00:00
personal_access_token.rb OAuth2 support for GitLab personal access tokens 2019-07-22 08:50:25 +00:00
personal_snippet.rb
pool_repository.rb
programming_language.rb
project.rb Migrations for Cycle Analytics backend 2019-08-15 19:19:37 +00:00
project_authorization.rb
project_auto_devops.rb Remove ignore rule for ProjectAutoDevops#domain 2019-07-22 15:46:00 +10:00
project_ci_cd_setting.rb Move project default git depth behind feature flags 2019-06-10 17:40:19 +00:00
project_custom_attribute.rb
project_daily_statistic.rb
project_deploy_token.rb
project_feature.rb Fix wrong pages access level default 2019-07-17 12:56:58 +00:00
project_group_link.rb
project_import_data.rb
project_import_state.rb Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
project_label.rb
project_metrics_setting.rb
project_repository.rb
project_snippet.rb
project_statistics.rb Removes update_statistics_namespace feature flag 2019-08-02 09:29:29 -05:00
project_team.rb
project_wiki.rb
prometheus_metric.rb Support dashboard params for metrics dashboard 2019-08-07 16:17:35 +00:00
prometheus_metric_enums.rb Support dashboard params for metrics dashboard 2019-08-07 16:17:35 +00:00
protectable_dropdown.rb
protected_branch.rb
protected_tag.rb
push_event.rb
push_event_payload.rb
readme_blob.rb
redirect_route.rb Further remove code branches by database type 2019-07-29 12:47:06 +02:00
ref_matcher.rb
release.rb Show upcoming status for releases 2019-07-03 09:12:15 +00:00
remote_mirror.rb Rework retry strategy for remote mirrors 2019-08-13 20:52:01 +00:00
repository.rb Expire project caches once per push instead of once per ref 2019-08-16 19:53:56 +00:00
repository_language.rb
resource_label_event.rb Update label note to support scoped labels notes 2019-07-02 13:27:03 +02:00
route.rb
security_event.rb
sent_notification.rb
service.rb Final removal of KubernetesService 2019-08-08 09:47:07 +10:00
shard.rb
snippet.rb GraphQL mutations for add, remove and toggle emoji 2019-06-28 12:03:33 +12:00
snippet_blob.rb
spam_log.rb
ssh_host_key.rb Add a rubocop for Rails.logger 2019-07-10 19:26:47 +00:00
subscription.rb
suggestion.rb
system_note_metadata.rb Add system notes for when a zoom call was added/removed from an issue 2019-07-29 21:51:16 +02:00
term_agreement.rb
timelog.rb
todo.rb Rename Todos.with_api_entity_associations to with_entity_associations 2019-06-24 10:49:13 -07:00
tree.rb
trending_project.rb
u2f_registration.rb
upload.rb
user.rb Merge branch '47003-user-onboarding-replace-current-email-confirmation-flow-with-a-soft-email-confirmation-flow' into 'master' 2019-08-16 12:31:16 +00:00
user_agent_detail.rb
user_callout.rb
user_callout_enums.rb Revert "Merge branch '64341-data-and-privacy-agreement-for-gitlab-users' into 'master'" 2019-08-14 17:53:07 +00:00
user_custom_attribute.rb
user_interacted_project.rb
user_preference.rb Enable Rubocop Performance/InefficientHashSearch 2019-07-24 11:47:58 -07:00
user_status.rb
user_synced_attributes_metadata.rb
users_star_project.rb Fix public/private starrers counts in special cases 2019-08-07 20:49:37 +02:00
wiki_directory.rb
wiki_page.rb