mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Extend tracing in watchCache
This commit is contained in:
parent
57a47b6af5
commit
6d06a384ad
@ -223,6 +223,9 @@ func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64, trace *util.T
|
|||||||
|
|
||||||
w.RLock()
|
w.RLock()
|
||||||
defer w.RUnlock()
|
defer w.RUnlock()
|
||||||
|
if trace != nil {
|
||||||
|
trace.Step("watchCache locked acquired")
|
||||||
|
}
|
||||||
for w.resourceVersion < resourceVersion {
|
for w.resourceVersion < resourceVersion {
|
||||||
if w.clock.Since(startTime) >= MaximumListWait {
|
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)
|
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()
|
w.cond.Wait()
|
||||||
}
|
}
|
||||||
if trace != nil {
|
if trace != nil {
|
||||||
trace.Step("Cache is fresh enough")
|
trace.Step("watchCache fresh enough")
|
||||||
}
|
}
|
||||||
return w.store.List(), w.resourceVersion, nil
|
return w.store.List(), w.resourceVersion, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user