Skip to content

Conversation

@alexsnaps
Copy link
Member

I don't think this is really a desirable fix to be honest... O(n) isn't really sustainable.
Probably resorting to a ordered collection and have all qualified counters for a qualified limit next to each other would be better... I'll see what I can do as part of #397

let l = limit.clone();
match self
.qualified_counters
.invalidate_entries_if(move |c, _| c.limit() == &l)
Copy link
Member Author

@alexsnaps alexsnaps Dec 11, 2024

Choose a reason for hiding this comment

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

Whether an entry actually needs invalidation will be checked for on the .get path by moka... so this isn't racy

@alexsnaps alexsnaps requested review from kuadrant-dev and removed request for adam-cattermole January 30, 2025 11:15
Copy link
Member

@adam-cattermole adam-cattermole left a comment

Choose a reason for hiding this comment

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

Sorry for the slow review, I looked at it before and meant to get back to it

Signed-off-by: Alex Snaps <alex@wcgw.dev>
Signed-off-by: Alex Snaps <alex@wcgw.dev>
Signed-off-by: Alex Snaps <alex@wcgw.dev>
@alexsnaps alexsnaps merged commit 066b218 into main Jan 30, 2025
10 checks passed
@alexsnaps alexsnaps deleted the qualified_deletes branch January 30, 2025 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants