Add HTTP 410 (Gone) status code checks to reflector and relist with RV=''

Kubernetes-commit: e2fe126d485af243d45f06bafd2ca83931881429
This commit is contained in:
Joe Betz 2019-10-09 16:45:32 -07:00 committed by Kubernetes Publisher
parent 1ff272f3f7
commit 1ee386df74
1 changed files with 1 additions and 1 deletions

View File

@ -468,7 +468,7 @@ func (w *watchCache) GetAllEventsSinceThreadUnsafe(resourceVersion uint64) ([]*w
return result, nil return result, nil
} }
if resourceVersion < oldest-1 { if resourceVersion < oldest-1 {
return nil, errors.NewGone(fmt.Sprintf("too old resource version: %d (%d)", resourceVersion, oldest-1)) return nil, errors.NewResourceExpired(fmt.Sprintf("too old resource version: %d (%d)", resourceVersion, oldest-1))
} }
// Binary search the smallest index at which resourceVersion is greater than the given one. // Binary search the smallest index at which resourceVersion is greater than the given one.