evict inbound dynamic policy discovery watches#1684
Merged
olix0r merged 5 commits intover/inbound-discofrom May 20, 2022
Merged
evict inbound dynamic policy discovery watches#1684olix0r merged 5 commits intover/inbound-discofrom
olix0r merged 5 commits intover/inbound-discofrom
Conversation
Contributor
Author
|
I'd like to also add some tests asserting that the policy watches are actually completely torn down on eviction, but AFAICT they should be... |
olix0r
reviewed
May 19, 2022
olix0r
reviewed
May 19, 2022
Contributor
Author
|
@olix0r updated based on your suggestions, plmkwyt! |
Signed-off-by: Oliver Gould <[email protected]>
Signed-off-by: Eliza Weisman <[email protected]>
4d00d30 to
6b84e25
Compare
hawkw
commented
May 19, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch adds idle eviction for the dynamic policy lookups for
inbound ports added in #1677. Idle lookups are evicted by replacing the
HashMapof ports to watches with the theCachetype fromlinkerd-cache, which tracks when a policy watch is in use, and removesthem from the cache when they have been idle for too long. PR #1683
modifies
Cacheto allow it to be used as a general-purpose key-valuecache in addition to a
NewServiceimplementation, so this branchdepends on #1683.