Skip to content

Commit bdf2e2d

Browse files
committed
Fix non-recursive list should also read RequestWatchProgress feature when consistent list from cache is enabled
1 parent 1b22629 commit bdf2e2d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

staging/src/k8s.io/apiserver/pkg/storage/cacher/watch_cache.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,8 @@ func (w *watchCache) notFresh(resourceVersion uint64) bool {
518518
// WaitUntilFreshAndGet returns a pointers to <storeElement> object.
519519
func (w *watchCache) WaitUntilFreshAndGet(ctx context.Context, resourceVersion uint64, key string) (interface{}, bool, uint64, error) {
520520
var err error
521-
if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && w.notFresh(resourceVersion) {
521+
requestWatchProgressSupported := etcdfeature.DefaultFeatureSupportChecker.Supports(storage.RequestWatchProgress)
522+
if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && requestWatchProgressSupported && w.notFresh(resourceVersion) {
522523
w.waitingUntilFresh.Add()
523524
err = w.waitUntilFreshAndBlock(ctx, resourceVersion)
524525
w.waitingUntilFresh.Remove()

0 commit comments

Comments
 (0)