Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message-validation: graceful validation locks management #1840

Open
wants to merge 2 commits into
base: stage
Choose a base branch
from

Conversation

iurii-ssv
Copy link
Contributor

@iurii-ssv iurii-ssv commented Nov 6, 2024

I've been browsing message validation code and noticed there is this ever-growing map (as is mentioned in TODO-comments also) - decided to fix it while I have the relevant context (as well as document our assumptions on this).

The general approach on keeping map size under control mirrors the one implemented here - perhaps we want to create a helper type that combines ttlcache.Cache and singleflight.Group in this manner - since we are doing it at least twice already (and will likely need to use this pattern in future), WDYT ?

go.mod Outdated
go 1.22
go 1.23.1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is pretty much a requirement to use tailscale.com v1.76.3

Copy link
Contributor Author

@iurii-ssv iurii-ssv Nov 8, 2024

Choose a reason for hiding this comment

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

I've added a commit on top to drop it down to tailscale.com v1.72.0 so we can keep using go 1.22 like this (as I've done in #1798 (comment)):

go 1.22.0

toolchain go1.23.1

See #1840 (comment) for more details.

Copy link
Contributor

@nkryuchkov nkryuchkov left a comment

Choose a reason for hiding this comment

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

LGTM

go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
@iurii-ssv iurii-ssv force-pushed the message-validation-graceful-validation-locks-management branch from de9e2f2 to cfc63e4 Compare November 19, 2024 10:26
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