Skip to content

Commit 49bbe19

Browse files
authored
Merge pull request kubernetes#130297 from 249043822/br0004
Fix non-recursive list should also read RequestWatchProgress feature when consistent list from cache is enabled
2 parents 0b1ef24 + bdf2e2d commit 49bbe19

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)