mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 07:47:56 +00:00
Merge pull request #130297 from 249043822/br0004
Fix non-recursive list should also read RequestWatchProgress feature when consistent list from cache is enabled
This commit is contained in:
commit
49bbe19460
@ -518,7 +518,8 @@ func (w *watchCache) notFresh(resourceVersion uint64) bool {
|
|||||||
// WaitUntilFreshAndGet returns a pointers to <storeElement> object.
|
// WaitUntilFreshAndGet returns a pointers to <storeElement> object.
|
||||||
func (w *watchCache) WaitUntilFreshAndGet(ctx context.Context, resourceVersion uint64, key string) (interface{}, bool, uint64, error) {
|
func (w *watchCache) WaitUntilFreshAndGet(ctx context.Context, resourceVersion uint64, key string) (interface{}, bool, uint64, error) {
|
||||||
var err error
|
var err error
|
||||||
if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && w.notFresh(resourceVersion) {
|
requestWatchProgressSupported := etcdfeature.DefaultFeatureSupportChecker.Supports(storage.RequestWatchProgress)
|
||||||
|
if utilfeature.DefaultFeatureGate.Enabled(features.ConsistentListFromCache) && requestWatchProgressSupported && w.notFresh(resourceVersion) {
|
||||||
w.waitingUntilFresh.Add()
|
w.waitingUntilFresh.Add()
|
||||||
err = w.waitUntilFreshAndBlock(ctx, resourceVersion)
|
err = w.waitUntilFreshAndBlock(ctx, resourceVersion)
|
||||||
w.waitingUntilFresh.Remove()
|
w.waitingUntilFresh.Remove()
|
||||||
|
Loading…
Reference in New Issue
Block a user