diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-13 09:04:30 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-13 09:04:30 -0700 |
commit | e658f9603c99ca6a8ef4c0292b2cdab2916fb09e (patch) | |
tree | 57e0c03ea5dd676c7a53243bf3da20aefafc0ded /spec/services/git | |
parent | 3702ab7317533896c7455357dd6643181666f22b (diff) | |
download | gitlab-ce-e658f9603c99ca6a8ef4c0292b2cdab2916fb09e.tar.gz |
Only expire tag cache once per pushsh-only-flush-tags-once-per-push
Previously each tag in a push would invoke the Gitaly `FindAllTags` RPC
since the tag cache would be invalidated with every tag.
We can eliminate those extraneous calls by expiring the tag cache once
in `PostReceive` and taking advantage of the cached tags.
Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/65795
Diffstat (limited to 'spec/services/git')
-rw-r--r-- | spec/services/git/tag_push_service_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/services/git/tag_push_service_spec.rb b/spec/services/git/tag_push_service_spec.rb index 418952b52da..7e008637182 100644 --- a/spec/services/git/tag_push_service_spec.rb +++ b/spec/services/git/tag_push_service_spec.rb @@ -26,8 +26,8 @@ describe Git::TagPushService do subject end - it 'flushes the tags cache' do - expect(project.repository).to receive(:expire_tags_cache) + it 'does not flush the tags cache' do + expect(project.repository).not_to receive(:expire_tags_cache) subject end |