From 80b41af8f162cf2610522df95616032cd98866fb Mon Sep 17 00:00:00 2001 From: Simon Guindon Date: Fri, 3 Jan 2020 22:48:12 -0500 Subject: [PATCH] satellite/metainfo: Fixed bug that discarded context cancellation errors When the context was being cancelled the error was being discarded within the rate limiting error handling which caused tests to fail. Change-Id: I5c6458c16da09a11531233ea0ee80d914969cb3f --- satellite/metainfo/loop.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/satellite/metainfo/loop.go b/satellite/metainfo/loop.go index d6911d4ee..4b64b4284 100644 --- a/satellite/metainfo/loop.go +++ b/satellite/metainfo/loop.go @@ -242,7 +242,8 @@ func iterateDatabase(ctx context.Context, db PointerDB, observers []*observerCon if err := rateLimiter.Wait(ctx); err != nil { // We don't really execute concurrent batches so we should never // exceed the burst size of 1 and this should never happen. - return LoopError.New("unexpected error rate limiting metainfo loop %s", err) + // We can also enter here if the context is cancelled. + return LoopError.Wrap(err) } rawPath := item.Key.String()