-
Notifications
You must be signed in to change notification settings - Fork 305
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
When using advanced storage strategy, why copy the peer data file into the same dir as the output file? #1683
Comments
To avoid copying the daemon cache across filesystems to the specified directory. |
Hardlink is fast than copying the file. |
Yep I definitely like the hard link approach. But I don't see why links need to exist in If the So just download straight to |
The strategy |
It appears that in https://github.com/dragonflyoss/Dragonfly2/blob/main/client/daemon/storage/storage_manager.go#L454 the symlink is done as a fallback if the hard link fails, when using |
I just updated my comment above, as my |
Per the documentation, when using the
io.d7y.storage.v2.advance
storage strategy, the peer data file is copied into the same directory as the output file.After running
dfget <url> -O /tmp/eddie_test
, I have observed that there are actually 3 hard links to the file. They are:/tmp/eddie_test
/tmp/.eddie_test.dfget.cache.<req.PeerID>
<dataDir>/<req.TaskID>/<req.PeerID>/data
Why not just copy the file to the dataDir, and link from there?
The text was updated successfully, but these errors were encountered: