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

feat: add 'LoadToCache' in Download message when starting a preheat job #3769

Closed

Conversation

SouthWest7
Copy link

Description

This commit introduces the LoadToCache field in the Download message, which is used to indicate whether content should be loaded into the memory cache during a preheat job.

  • Set LoadToCache to true in three scopes: Single Seed Peer, All Seed Peers and All Peers.

Related Issue

#3742

Motivation and Context

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@SouthWest7 SouthWest7 changed the title feat: add 'LoadTocCache' in Download message when starting a preheat job feat: add 'LoadToCache' in Download message when starting a preheat job Jan 21, 2025
@@ -307,6 +307,7 @@ func (j *job) preheatAllSeedPeers(ctx context.Context, taskID string, req *inter
RequestHeader: req.Headers,
Timeout: durationpb.New(req.Timeout),
CertificateChain: req.CertificateChain,
LoadToCache: true,
Copy link
Member

Choose a reason for hiding this comment

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

Why need to force the specification of true and pass it in through parameters?

@gaius-qi gaius-qi closed this Jan 21, 2025
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.

2 participants