Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Okstad <pokstad@gitlab.com>2019-05-02 22:40:57 +0300
committerPaul Okstad <pokstad@gitlab.com>2019-05-02 22:40:57 +0300
commit81712c27e13def0af519f8429e327e9524306297 (patch)
treebe6ee4144e38757200533db7252e1fa9bfc77650
parent104efcb503c3d455ce4d45b92e52e9c8fbcd0746 (diff)
parentfecd986afba1dca30dcc642dc1908b3005dcf0e9 (diff)
Merge branch 'jc-do-not-close-ttl-channel' into 'master'
Do not close the TTL channel twice See merge request gitlab-org/gitaly!1235
-rw-r--r--changelogs/unreleased/jc-do-not-close-ttl-channel.yml5
-rw-r--r--internal/git/catfile/batch_cache.go1
2 files changed, 5 insertions, 1 deletions
diff --git a/changelogs/unreleased/jc-do-not-close-ttl-channel.yml b/changelogs/unreleased/jc-do-not-close-ttl-channel.yml
new file mode 100644
index 000000000..e66a72d58
--- /dev/null
+++ b/changelogs/unreleased/jc-do-not-close-ttl-channel.yml
@@ -0,0 +1,5 @@
+---
+title: Do not close the TTL channel twice
+merge_request: 1235
+author:
+type: fixed
diff --git a/internal/git/catfile/batch_cache.go b/internal/git/catfile/batch_cache.go
index b0db3b289..3b4714539 100644
--- a/internal/git/catfile/batch_cache.go
+++ b/internal/git/catfile/batch_cache.go
@@ -116,7 +116,6 @@ func (bc *BatchCache) Add(key CacheKey, b *Batch, ttl time.Duration) {
if v, ok := bc.lru.Get(key); ok {
existing := v.(*CacheItem)
- close(existing.stopTTL)
existing.batch.Close()
bc.lru.Remove(key)
}