-
Notifications
You must be signed in to change notification settings - Fork 50
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
Cache peers list #756
Open
mariusSincovici
wants to merge
4
commits into
mesh-cleanup
Choose a base branch
from
cache-peers-list
base: mesh-cleanup
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Cache peers list #756
Conversation
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
551b3f7
to
b5e68c0
Compare
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
keliramu
reviewed
Feb 5, 2025
devzbysiu
reviewed
Feb 6, 2025
a32a34c
to
729d935
Compare
729d935
to
8612ccd
Compare
8612ccd
to
139f69d
Compare
Split is done in order to allow creating separate functionality expansions when data is retrieved from API or uploaded to API. Signed-off-by: Savolro <me@savolro.com>
139f69d
to
81a58d8
Compare
81a58d8
to
752803e
Compare
7de6d8a
to
373e8e2
Compare
752803e
to
5d878e4
Compare
5d878e4
to
859f81a
Compare
859f81a
to
0886404
Compare
mariusSincovici
commented
Feb 26, 2025
lastMap := r.lastMap | ||
peerPub := r.peerPub | ||
r.mu.RUnlock() | ||
if !forceUpdate && !bytes.Equal(lastMap, resp.Raw) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this condition is not correct 🤔
shouldn't be if forceUpdate || !bytes.Equal(lastMap, resp.Raw)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated coment with the explaination
0886404
to
10c3318
Compare
10c3318
to
0ce7b9d
Compare
When meshnet map is requested from the `mesh.Retriever`, instead of calling API directly, it is called via `CachingRetriever`. Also, `NotifyingRegistry` was introduced as well to make sure that any changes to meshnet map made by this device would notify the subscribers about it. This also means, that application now reacts to these changes in a same way as it does to NC messages, therefore it is no longer needed to call networker directly from meshnet map modifying gRPC functions. Signed-off-by: Savolro <me@savolro.com>
When accepting meshnet invitations, it is guaranteed that new peer is added to the meshnet. Therefore, it is valid to refresh meshnet at this point. Signed-off-by: Savolro <me@savolro.com>
Signed-off-by: Savolro <me@savolro.com>
0ce7b9d
to
330159c
Compare
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.
No description provided.