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

pkg/debuginfo: Improve debuginfod client #3413

Merged
merged 2 commits into from
Jul 7, 2023
Merged

Conversation

brancz
Copy link
Member

@brancz brancz commented Jul 6, 2023

This introduces a few improvements:

  • Parallelize debuginfod client requests.
  • Cache exists responses from upstream servers for 10 minutes.
  • Make caching of debuginfod blobs explicit on object storage (per debuginfod server).
  • Retrieve debuginfod binaries only from the server that it was previously identified to be available from.
  • Add tracing for HTTP client requests.

Closes #3028

@brancz brancz requested review from a team as code owners July 6, 2023 09:45
@brancz brancz force-pushed the debuginfod-client-improved branch 2 times, most recently from cb878c0 to 1e76300 Compare July 6, 2023 09:51

func (c *DebuginfodExistsClientCache) Exists(ctx context.Context, buildID string) (bool, error) {
if v, ok := c.lruCache.Get(buildID); ok {
if time.Since(v.lastResponseTime) < 10*time.Minute {
Copy link
Member

Choose a reason for hiding this comment

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

Yes! nice!

@brancz
Copy link
Member Author

brancz commented Jul 6, 2023

I'm gonna test this on Polar Signals Cloud before merging here. I'll let y'all know how it goes.

This introduces a few improvements:
* Parallelize debuginfod client requests.
* Cache exists responses from upstream servers for 10 minutes.
* Make caching of debuginfod blobs explicit on object storage (per
  debuginfod server).
* Retrieve debuginfod binaries only from the server that it was
  previously identified to be available from.
* Add tracing for HTTP client requests.
@brancz brancz force-pushed the debuginfod-client-improved branch from 5ae657a to a38b082 Compare July 7, 2023 10:31
@brancz brancz merged commit 15b99e2 into main Jul 7, 2023
36 of 37 checks passed
@brancz brancz deleted the debuginfod-client-improved branch July 7, 2023 12:17
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.

Implement cache for debuginfod exists responses
3 participants