forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hc: Replay the current service state on Subscribe call
Currently, the Subscribe only publish the event observed after the subscription. In this way, subscribers may miss some events depending on the timing of the subscription. To avoid this issue, replay the latest state on subscription. The potential concern here is we hold the Service's writer lock during this operation. This is necessary to prevent the parallel service update. However, it may cause long blocking with the large cluster. However, Subscribe is typically called only once on startup, so there's no much impact for the overall performance. Signed-off-by: Yutaro Hayakawa <[email protected]>
- Loading branch information
1 parent
ab090b2
commit b72618e
Showing
2 changed files
with
55 additions
and
10 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