gitlab-org--gitlab-foss/spec/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/cycle_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 performance issue in Helm#can_uninstall? 2019-08-13 15:18:59 +10:00
concerns Bring scoped environment variables to core 2019-08-08 18:51:52 +00:00
conversational_development_index
cycle_analytics Add code review remarks 2019-07-16 18:45:15 +02:00
diff_viewer
error_tracking
hooks
issue Upgrade to Rails 5.2 2019-07-12 10:15:31 +08:00
members Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
merge_request
namespace Hardcodes namespaces lease timing value to 1.5h 2019-08-01 15:27:12 +00:00
network
postgresql Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
project_services Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
protected_branch
releases
serverless
uploads
ability_spec.rb
abuse_report_spec.rb
active_session_spec.rb Rake task to cleanup expired ActiveSession lookup keys 2019-07-22 17:15:57 +02:00
appearance_spec.rb Fix order-dependent spec failure in appearance_spec.rb 2019-07-03 11:27:16 -07:00
application_record_spec.rb
application_setting_spec.rb Allow blank but not nil in validations 2019-07-31 06:54:03 +00:00
award_emoji_spec.rb
badge_spec.rb
blob_spec.rb
board_group_recent_visit_spec.rb
board_project_recent_visit_spec.rb
board_spec.rb
broadcast_message_spec.rb Set 2 weeks as the expiration time for the current broadcast message 2019-06-25 19:41:05 -03:00
chat_name_spec.rb
chat_team_spec.rb
commit_collection_spec.rb
commit_range_spec.rb Banzai - avoid redis if attr is in DB cache 2019-07-10 21:35:43 -06:00
commit_spec.rb Fix inline rendering of SVGs from current repo 2019-08-02 06:34:20 +08:00
commit_status_spec.rb
compare_spec.rb
container_repository_spec.rb Support Docker OCI images 2019-07-25 04:11:38 -07:00
deploy_key_spec.rb
deploy_keys_project_spec.rb
deploy_token_spec.rb Add username to deploy tokens 2019-07-02 18:56:48 +00:00
deployment_metrics_spec.rb Removes potentially incorrect, and slow fallback 2019-07-25 16:46:20 +12:00
deployment_spec.rb Remove un-used method 2019-07-08 09:14:37 +12:00
diff_discussion_spec.rb
diff_note_spec.rb Make diff_refs_match_commit validation reusable 2019-08-01 16:00:36 -05:00
discussion_spec.rb GraphQL support for Notes created in discussions 2019-07-10 12:13:48 +12:00
email_spec.rb
environment_spec.rb Use separate Kubernetes namespaces per environment 2019-08-07 04:40:29 +00:00
environment_status_spec.rb Share project object in EnvironmentStatus 2019-07-08 09:13:21 +12:00
event_collection_spec.rb
event_spec.rb
external_issue_spec.rb
fork_network_member_spec.rb
fork_network_spec.rb
generic_commit_status_spec.rb
global_milestone_spec.rb
gpg_key_spec.rb
gpg_key_subkey_spec.rb
gpg_signature_spec.rb
group_custom_attribute_spec.rb
group_label_spec.rb
group_milestone_spec.rb
group_spec.rb Add group level container repository endpoints 2019-08-05 20:00:50 +00:00
guest_spec.rb
identity_spec.rb
import_export_upload_spec.rb
instance_configuration_spec.rb
internal_id_spec.rb Fix failing spec/models/internal_id_spec.rb spec 2019-06-26 14:33:57 +00:00
issue_collection_spec.rb
issue_spec.rb Make RelativePositioning reusable 2019-07-24 14:19:49 +02:00
key_spec.rb
label_link_spec.rb
label_note_spec.rb
label_priority_spec.rb
label_spec.rb Add where condition to filter out invalid labels with nil type 2019-07-24 10:22:37 +02:00
legacy_diff_discussion_spec.rb
lfs_download_object_spec.rb Add outbound requests setting for system hooks 2019-08-02 15:39:18 +01:00
lfs_file_lock_spec.rb
lfs_object_spec.rb
lfs_objects_project_spec.rb
license_template_spec.rb
list_spec.rb
member_spec.rb Improve spec description in member_spec.rb 2019-08-11 22:56:11 -07:00
merge_request_diff_commit_spec.rb
merge_request_diff_file_spec.rb
merge_request_diff_spec.rb Add MergeRequestDiff#lines_count convenience method 2019-08-06 11:38:50 +03:00
merge_request_spec.rb Only read rebase status from the model 2019-08-15 18:54:08 +00:00
milestone_spec.rb
namespace_spec.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
note_diff_file_spec.rb
note_spec.rb Fix first-time contributor notes not rendering 2019-07-31 06:52:11 -07:00
notification_recipient_spec.rb Allow disabling group/project email notifications 2019-08-15 17:37:36 +00:00
notification_setting_spec.rb
pages_domain_acme_order_spec.rb
pages_domain_spec.rb Validate certificate chain only if it's changed 2019-07-22 15:38:08 +00:00
personal_access_token_spec.rb
pool_repository_spec.rb
programming_language_spec.rb
project_authorization_spec.rb
project_auto_devops_spec.rb Remove ignore rule for ProjectAutoDevops#domain 2019-07-22 15:46:00 +10:00
project_ci_cd_setting_spec.rb
project_custom_attribute_spec.rb
project_daily_statistic_spec.rb
project_deploy_token_spec.rb
project_feature_spec.rb Further remove code branches by database type 2019-07-29 12:47:06 +02:00
project_group_link_spec.rb Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
project_import_data_spec.rb
project_import_state_spec.rb
project_label_spec.rb
project_metrics_setting_spec.rb
project_repository_spec.rb
project_snippet_spec.rb
project_spec.rb Migrations for Cycle Analytics backend 2019-08-15 19:19:37 +00:00
project_statistics_spec.rb Removes update_statistics_namespace feature flag 2019-08-02 09:29:29 -05:00
project_team_spec.rb
project_wiki_spec.rb
prometheus_metric_spec.rb Support dashboard params for metrics dashboard 2019-08-07 16:17:35 +00:00
protectable_dropdown_spec.rb
protected_branch_spec.rb
protected_tag_spec.rb
push_event_payload_spec.rb
push_event_spec.rb
redirect_route_spec.rb
release_spec.rb Show upcoming status for releases 2019-07-03 09:12:15 +00:00
remote_mirror_spec.rb Rework retry strategy for remote mirrors 2019-08-13 20:52:01 +00:00
repository_language_spec.rb
repository_spec.rb Expire project caches once per push instead of once per ref 2019-08-16 19:53:56 +00:00
resource_label_event_spec.rb
route_spec.rb
sent_notification_spec.rb
service_spec.rb Use title and description fields for issue trackers 2019-07-02 15:00:27 +02:00
shard_spec.rb
snippet_blob_spec.rb
snippet_spec.rb
spam_log_spec.rb
ssh_host_key_spec.rb
subscription_spec.rb
suggestion_spec.rb
system_note_metadata_spec.rb
term_agreement_spec.rb
timelog_spec.rb
todo_spec.rb Remove code related to object hierarchy in MySQL 2019-07-25 15:35:06 +08:00
tree_spec.rb
trending_project_spec.rb
upload_spec.rb
user_agent_detail_spec.rb
user_callout_spec.rb
user_custom_attribute_spec.rb
user_interacted_project_spec.rb
user_preference_spec.rb
user_spec.rb Add spec for User#accessible_deploy_keys 2019-08-05 06:42:34 -07:00
user_status_spec.rb
wiki_directory_spec.rb
wiki_page_spec.rb Prefer flat_map over map + flatten in specs 2019-07-24 08:19:15 +00:00