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

perf: remove unncessary goroutine pileup of skippeer workers #4993

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

istae
Copy link
Member

@istae istae commented Feb 6, 2025

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Before, for each pushsync and retrieval, a separate skippeers list was created, along side it a worker that would prune entries based on a timer. Now, the worker is created once only for the errSkip peers list, and not for each request.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):


defer l.wg.Done()

ticker := time.NewTicker(time.Minute)
ticker := time.NewTicker(d)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a fallback check before just in case we send d=0 , or smaller?

Copy link
Member Author

Choose a reason for hiding this comment

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

The check in the constructor should be enough

@istae istae merged commit 4940ef8 into master Feb 6, 2025
14 of 15 checks passed
@istae istae deleted the skippers-goroutine branch February 6, 2025 15:37
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.

4 participants