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

fix: parallelize filter subs to different peers #1169

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

chaitanyaprem
Copy link
Collaborator

@chaitanyaprem chaitanyaprem commented Jul 26, 2024

Description

Noticed that since we use 2 peers to subscribe for a filter and each subscription request it sent in sequence which causes delay in case first one times-out due to unreachability of peer.

  • invoking request in separate go routines will make the subs to 2 peers happen in parallel.
  • added a timeout of 10secs for subscription to succeed to speed up failure detection.
  • Fixed race condition in lightpush send
  • added 10sec timeout for lightpush request

@jm-clius thanks for hint yesterday about parallel subscriptions that made me review this part of the code.

waku/v2/protocol/filter/client.go Dismissed Show dismissed Hide dismissed
waku/v2/protocol/filter/client.go Dismissed Show dismissed Hide dismissed
@chaitanyaprem chaitanyaprem force-pushed the fix/parallel-filter-sub branch from 4672a7a to f7adb0a Compare July 26, 2024 10:57
@chaitanyaprem chaitanyaprem force-pushed the fix/parallel-filter-sub branch from 58d2ad4 to 81d539c Compare July 29, 2024 06:47
@chaitanyaprem chaitanyaprem merged commit e1e136c into master Jul 30, 2024
11 of 12 checks passed
@chaitanyaprem chaitanyaprem deleted the fix/parallel-filter-sub branch July 30, 2024 12:36
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.

2 participants