Skip to content

Allow watch streaming option for lister watcher to prevent high memory spike.#1038

Merged
zkdlin211 merged 4 commits intoGoogleCloudPlatform:masterfrom
zkdlin211:lister-watcher-streaming
Jan 12, 2026
Merged

Allow watch streaming option for lister watcher to prevent high memory spike.#1038
zkdlin211 merged 4 commits intoGoogleCloudPlatform:masterfrom
zkdlin211:lister-watcher-streaming

Conversation

@zkdlin211
Copy link
Contributor

Rather than ignore the previous unhandled events completely in #1027, which can cause event loss. This memory optimize approach load the event one by one to prevent memory spike if the number of accumulated events are large.

// Manually pass to handler since we bypass Reflector's store
config.Handler.OnAdd(e)
}
case watch.Bookmark:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we set AllowWatchBookmarks: true in the options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, also added according handling logic

@zkdlin211 zkdlin211 merged commit 59d3376 into GoogleCloudPlatform:master Jan 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants