Merge pull request #34935 from wojtek-t/addtional_tracing_step

Automatic merge from submit-queue

Extend tracing in watchCache
pull/6/head
Kubernetes Submit Queue 2016-10-17 03:19:55 -07:00 committed by GitHub
commit 418a1d3093
1 changed files with 4 additions and 1 deletions

View File

@ -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
}