Skip to content

evict inbound dynamic policy discovery watches#1684

Merged
olix0r merged 5 commits intover/inbound-discofrom
eliza/inbound-disco-evict
May 20, 2022
Merged

evict inbound dynamic policy discovery watches#1684
olix0r merged 5 commits intover/inbound-discofrom
eliza/inbound-disco-evict

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented May 18, 2022

This branch adds idle eviction for the dynamic policy lookups for
inbound ports added in #1677. Idle lookups are evicted by replacing the
HashMap of ports to watches with the the Cache type from
linkerd-cache, which tracks when a policy watch is in use, and removes
them from the cache when they have been idle for too long. PR #1683
modifies Cache to allow it to be used as a general-purpose key-value
cache in addition to a NewService implementation, so this branch
depends on #1683.

@hawkw hawkw requested a review from olix0r May 18, 2022 20:18
@hawkw
Copy link
Contributor Author

hawkw commented May 18, 2022

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...

@hawkw hawkw marked this pull request as ready for review May 19, 2022 19:20
@hawkw hawkw requested a review from a team as a code owner May 19, 2022 19:20
@hawkw
Copy link
Contributor Author

hawkw commented May 19, 2022

@olix0r updated based on your suggestions, plmkwyt!

@hawkw hawkw force-pushed the ver/inbound-disco branch from 7df7cf5 to c30e3f1 Compare May 19, 2022 19:44
@hawkw hawkw force-pushed the eliza/inbound-disco-evict branch from 4d00d30 to 6b84e25 Compare May 19, 2022 19:57
@hawkw
Copy link
Contributor Author

hawkw commented May 19, 2022

@olix0r now that #1683 has merged, I've rebased your PR #1677 onto main and this branch onto #1677. This should now only contain changes to your branch, and not all of the cache changes.

@hawkw hawkw requested a review from olix0r May 19, 2022 20:59
@olix0r olix0r merged commit 015d666 into ver/inbound-disco May 20, 2022
@olix0r olix0r deleted the eliza/inbound-disco-evict branch May 20, 2022 01:10
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