From c94eaa4957d98415b2450220815c50bf89526db3 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Tue, 1 Jun 2021 17:49:31 -0400 Subject: [PATCH] submatview: improve a couple comments --- agent/submatview/store.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent/submatview/store.go b/agent/submatview/store.go index cf99857089..80e9f30b7d 100644 --- a/agent/submatview/store.go +++ b/agent/submatview/store.go @@ -30,7 +30,7 @@ type Store struct { // idleTTL is the duration of time an entry should remain in the Store after the // last request for that entry has been terminated. It is a field on the struct - // so that it can be patched in tests without need a lock. + // so that it can be patched in tests without needing a global lock. idleTTL time.Duration } @@ -122,8 +122,8 @@ func (s *Store) Get(ctx context.Context, req Request) (Result, error) { defer cancel() result, err := materializer.getFromView(ctx, info.MinIndex) - // context.DeadlineExceeded is translated to nil to match the behaviour of - // agent/cache.Cache.Get. + // context.DeadlineExceeded is translated to nil to match the timeout + // behaviour of agent/cache.Cache.Get. if err == nil || errors.Is(err, context.DeadlineExceeded) { return result, nil }