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 'load_to_cache' field to Download message #437

Merged
merged 8 commits into from
Jan 8, 2025

Conversation

SouthWest7
Copy link
Contributor

@SouthWest7 SouthWest7 commented Jan 3, 2025

Description

load_to_cache indicates whether the content downloaded will be stored in the cache storage.

  • Cache storage: When a user triggers a preheat task request, and if the peer has the cache storage feature enabled, the downloaded piece content will be stored in the cache. Subsequently, when other peers request downloading the same content, the preheated peer can upload the piece content directly from memory, bypassing disk I/O and reducing the overhead associated with disk reads.
  • If the field is set to true, it signifies that the task is part of a preheat process and the content downloaded will be stored in the cache, assuming the feature is enabled.

Related Issue

dragonflyoss/dragonfly#3742

Motivation and Context

@SouthWest7 SouthWest7 requested a review from a team as a code owner January 3, 2025 05:40
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

Add bool load_to_cache = 21; to Download message.

@SouthWest7 SouthWest7 changed the title feat: add 'is_preheat_request' field to DownloadTaskRequest feat: add 'load_to_cache' field to Download message Jan 7, 2025
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

Use cache storage. Rewrite of description, because I don't know what you are trying to describe.

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit bff2301 into dragonflyoss:main Jan 8, 2025
1 check passed
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