From 6d06a384ad76a025b36ff130dfe5b973ddb5bdc1 Mon Sep 17 00:00:00 2001 From: Wojciech Tyczynski Date: Mon, 17 Oct 2016 11:22:59 +0200 Subject: [PATCH] Extend tracing in watchCache --- pkg/storage/watch_cache.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/storage/watch_cache.go b/pkg/storage/watch_cache.go index 182b61da17..84dc451ea7 100644 --- a/pkg/storage/watch_cache.go +++ b/pkg/storage/watch_cache.go @@ -223,6 +223,9 @@ func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64, trace *util.T w.RLock() defer w.RUnlock() + if trace != nil { + trace.Step("watchCache locked acquired") + } for w.resourceVersion < resourceVersion { if w.clock.Since(startTime) >= MaximumListWait { return nil, 0, fmt.Errorf("time limit exceeded while waiting for resource version %v (current value: %v)", resourceVersion, w.resourceVersion) @@ -230,7 +233,7 @@ func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64, trace *util.T w.cond.Wait() } if trace != nil { - trace.Step("Cache is fresh enough") + trace.Step("watchCache fresh enough") } return w.store.List(), w.resourceVersion, nil }