-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Fix cache sync timeout functionality
So far, timing out the cache sync in most realistic scenarios didn't work, bceause source.Kind gets an already started cache from the Manager. A cache that is already started will block forever on GetInformer which we called in source.Kinds start and not its WaitForSync. The context passed to Start however defines the entire lifecycle of the Source, not the Start timeout. This change makes source.Kind call GetInformer in Start but in a new go routine and WaitForSync just wait for that to finish or for its context to be cancelled. This preserves the existing semantic of starting in Start but waint for ready in WaitForSync.
- Loading branch information
1 parent
df2c43d
commit 4d059e8
Showing
3 changed files
with
68 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters