flowcontrol/request/list_work_estimator: sync shouldDelegateList
This commit is contained in:
		@@ -173,10 +173,10 @@ func shouldListFromStorage(query url.Values, opts *metav1.ListOptions) bool {
 | 
				
			|||||||
	consistentReadFromStorage := resourceVersion == "" && !(consistentListFromCacheEnabled && requestWatchProgressSupported)
 | 
						consistentReadFromStorage := resourceVersion == "" && !(consistentListFromCacheEnabled && requestWatchProgressSupported)
 | 
				
			||||||
	// Watch cache doesn't support continuations, so serve them from etcd.
 | 
						// Watch cache doesn't support continuations, so serve them from etcd.
 | 
				
			||||||
	hasContinuation := len(opts.Continue) > 0
 | 
						hasContinuation := len(opts.Continue) > 0
 | 
				
			||||||
	// Serve paginated requests about revision "0" from watch cache to avoid overwhelming etcd.
 | 
					 | 
				
			||||||
	hasLimit := opts.Limit > 0 && resourceVersion != "0"
 | 
					 | 
				
			||||||
	// Watch cache only supports ResourceVersionMatchNotOlderThan (default).
 | 
						// Watch cache only supports ResourceVersionMatchNotOlderThan (default).
 | 
				
			||||||
	unsupportedMatch := match != "" && match != metav1.ResourceVersionMatchNotOlderThan
 | 
						// see https://kubernetes.io/docs/reference/using-api/api-concepts/#semantics-for-get-and-list
 | 
				
			||||||
 | 
						isLegacyExactMatch := opts.Limit > 0 && match == "" && len(resourceVersion) > 0 && resourceVersion != "0"
 | 
				
			||||||
 | 
						unsupportedMatch := match != "" && match != metav1.ResourceVersionMatchNotOlderThan || isLegacyExactMatch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return consistentReadFromStorage || hasContinuation || hasLimit || unsupportedMatch
 | 
						return consistentReadFromStorage || hasContinuation || unsupportedMatch
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user