Skip to content

Commit 3c80d5e

Browse files
committed
dashboard/app: don't treat memcache.ErrNotStored as an error
We have a bunch of "failed to throttle: memcache: item not stored" errors in logs. It seems that the cache item is evicted before we do CompareAndSwap.
1 parent 20d37d2 commit 3c80d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dashboard/app/cache.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ func ThrottleRequest(c context.Context, requesterID string) (bool, error) {
314314
item.Expiration = cfg.Window
315315
item.Object = obj
316316
err = memcache.Gob.CompareAndSwap(c, item)
317-
if err == memcache.ErrCASConflict {
317+
if err == memcache.ErrCASConflict || err == memcache.ErrNotStored {
318318
if ok {
319319
// Only retry if we approved the query.
320320
// If we denied and there was a concurrent write

0 commit comments

Comments
 (0)