-
Notifications
You must be signed in to change notification settings - Fork 42
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
feat(filter): enhancing protocol peer management with mutex locks #2137
Conversation
size-limit report 📦
|
4de00a5
to
aeb05cd
Compare
09028e7
to
a89e69f
Compare
@@ -1,4 +1,4 @@ | |||
export const DEFAULT_KEEP_ALIVE = 30 * 1000; |
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.
Ideally we should be fine with increasing this number, not decreasing.
How did you reach this number?
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.
No particular reasoning. We can change it. 30S was a guesstimate as well
{ | ||
payload: utf8ToBytes("Hello_World") | ||
}, | ||
{ forceUseAllPeers: true } |
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.
why is this added?
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.
so that PeerManager is forced to find all peers until numPeersToUse
which await
s the process instead
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 see, then I think forceUseAllPeers
is a bit misleading - I thought it will use all the peers
can be a follow up
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.
Not important for now considering PeerManager is removed from LightPush: #2137 (comment)
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.
added comments
252ec59
to
2f00cc8
Compare
4e5e02f
to
43fa32b
Compare
please, address #2137 (comment) and #2137 (comment) before merging from code perspective seems fine but after dogfooding it I see following critical issue - filter doesn't work at all as the peers are constantly getting renewed (I see it happens due to Let's disable Used version https://github.com/waku-org/js-waku/actions/runs/11249833553/job/31277485871 |
Problem
The current implementation showcased a lot of inconsistencies around peer management for protocols.
Multiple weird behaviour were observed:
Solution
BaseProtocol
class to enhance performance and reliabilityFilterCore
classasync-mutex
for all locks-related choresNotes
Contribution checklist:
!
in title if breaks public API;