Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6a76931e
Unverified
Commit
6a76931e
authored
Sep 25, 2017
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use watch cache when rv=0 even when limit is set
parent
ac8808b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
cacher.go
staging/src/k8s.io/apiserver/pkg/storage/cacher.go
+7
-2
No files found.
staging/src/k8s.io/apiserver/pkg/storage/cacher.go
View file @
6a76931e
...
...
@@ -473,10 +473,15 @@ func (c *Cacher) GetToList(ctx context.Context, key string, resourceVersion stri
// Implements storage.Interface.
func
(
c
*
Cacher
)
List
(
ctx
context
.
Context
,
key
string
,
resourceVersion
string
,
pred
SelectionPredicate
,
listObj
runtime
.
Object
)
error
{
pagingEnabled
:=
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
APIListChunking
)
if
resourceVersion
==
""
||
(
pagingEnabled
&&
(
len
(
pred
.
Continue
)
>
0
||
pred
.
Limit
>
0
))
{
hasContinuation
:=
pagingEnabled
&&
len
(
pred
.
Continue
)
>
0
hasLimit
:=
pagingEnabled
&&
pred
.
Limit
>
0
&&
resourceVersion
!=
"0"
if
resourceVersion
==
""
||
hasContinuation
||
hasLimit
{
// If resourceVersion is not specified, serve it from underlying
// storage (for backward compatibility). If a continuation
or limit
is
// storage (for backward compatibility). If a continuation is
// requested, serve it from the underlying storage as well.
// Limits are only sent to storage when resourceVersion is non-zero
// since the watch cache isn't able to perform continuations, and
// limits are ignored when resource version is zero.
return
c
.
storage
.
List
(
ctx
,
key
,
resourceVersion
,
pred
,
listObj
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment