[ARVADOS] created: 51920838d495265bddb71e61dbd8122b1fe0cb6e
Git user
git at public.curoverse.com
Thu Jun 15 14:24:47 EDT 2017
at 51920838d495265bddb71e61dbd8122b1fe0cb6e (commit)
commit 51920838d495265bddb71e61dbd8122b1fe0cb6e
Author: Tom Clegg <tom at curoverse.com>
Date: Wed Jun 14 17:46:01 2017 -0400
11729: Avoid refetching manifest in forceReload case
...if uuid->pdh cache turns out not to be expired.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curoverse.com>
diff --git a/services/keep-web/cache.go b/services/keep-web/cache.go
index ab7c653..631960f 100644
--- a/services/keep-web/cache.go
+++ b/services/keep-web/cache.go
@@ -103,7 +103,6 @@ func (c *cache) Get(arv *arvadosclient.ArvadosClient, targetID string, forceRelo
var pdh string
if arvadosclient.PDHMatch(targetID) {
pdh = targetID
- } else if forceReload {
} else if ent, cached := c.pdhs.Get(targetID); cached {
ent := ent.(*cachedPDH)
if ent.expire.Before(time.Now()) {
diff --git a/services/keep-web/cache_test.go b/services/keep-web/cache_test.go
index f8aa2b1..f3b891e 100644
--- a/services/keep-web/cache_test.go
+++ b/services/keep-web/cache_test.go
@@ -97,8 +97,8 @@ func (s *UnitSuite) TestCacheForceReloadByUUID(c *check.C) {
}
c.Check(cache.Stats().Requests, check.Equals, uint64(4))
- c.Check(cache.Stats().CollectionHits, check.Equals, uint64(1))
+ c.Check(cache.Stats().CollectionHits, check.Equals, uint64(3))
c.Check(cache.Stats().PermissionHits, check.Equals, uint64(1))
- c.Check(cache.Stats().PDHHits, check.Equals, uint64(1))
+ c.Check(cache.Stats().PDHHits, check.Equals, uint64(3))
c.Check(cache.Stats().APICalls, check.Equals, uint64(3))
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list