mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #37125 from kubernetes/revert-37085-rv
Revert "Add fast-path for Listing with ResourceVersion=0"
This commit is contained in:
		@@ -283,13 +283,10 @@ func (w *watchCache) waitUntilFreshAndBlock(resourceVersion uint64, trace *util.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// WaitUntilFreshAndList returns list of pointers to <storeElement> objects.
 | 
					// WaitUntilFreshAndList returns list of pointers to <storeElement> objects.
 | 
				
			||||||
func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64, trace *util.Trace) ([]interface{}, uint64, error) {
 | 
					func (w *watchCache) WaitUntilFreshAndList(resourceVersion uint64, trace *util.Trace) ([]interface{}, uint64, error) {
 | 
				
			||||||
	// If resourceVersion == 0 we'll return the data that we currently have in cache.
 | 
						err := w.waitUntilFreshAndBlock(resourceVersion, trace)
 | 
				
			||||||
	if resourceVersion != 0 {
 | 
						defer w.RUnlock()
 | 
				
			||||||
		err := w.waitUntilFreshAndBlock(resourceVersion, trace)
 | 
						if err != nil {
 | 
				
			||||||
		defer w.RUnlock()
 | 
							return nil, 0, err
 | 
				
			||||||
		if err != nil {
 | 
					 | 
				
			||||||
			return nil, 0, err
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return w.store.List(), w.resourceVersion, nil
 | 
						return w.store.List(), w.resourceVersion, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user