This repository was archived by the owner on Dec 20, 2024. It is now read-only.
[Fix] Supernode local cdn connet check is not necessary when --cdnPattern=s… - #1518
Open
PWZER wants to merge 2 commits into
Open
[Fix] Supernode local cdn connet check is not necessary when --cdnPattern=s…#1518PWZER wants to merge 2 commits into
PWZER wants to merge 2 commits into
Conversation
Contributor
|
We found this is your first time to contribute to Dragonfly, @PWZER |
PWZER
force-pushed
the
master
branch
3 times, most recently
from
December 2, 2020 04:32
917e42f to
ad27d3f
Compare
…ource Signed-off-by: PWZER <pwzergo@gmail.com>
Signed-off-by: PWZER <pwzergo@gmail.com>
Contributor
|
Strictly speaking, we don't need an Nginx file server for supernode within source pattern. Thanks for your contribution. |
starnop
reviewed
Dec 11, 2020
|
|
||
| // check that the target download peer is available | ||
| if dstIP != "" && dstIP != pc.node { | ||
| if dstIP != "" && dstIP != pc.node && pc.pieceTask.Path != pc.cfg.URL { |
Contributor
There was a problem hiding this comment.
Maybe use pc.cdnSource != apiTypes.CdnSourceSource is better? WDYT?
Author
There was a problem hiding this comment.
@starnop There are three scenarios.
pc.cdnSource == apiTypes.CdnSourceSource && dstIP != supernodeIp, connect check is very necessary.- Only
pc.pieceTask.Path != pc.cfg.URL, need download piece from other peer, anddstIP != supernodeIp, connect check is very necessary. - Only
pc.pieceTask.Path == pc.cfg.URL, need download piece from source,anddstIP == supernodeIp, connect check is not necessary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ource
Ⅰ. Describe what this PR did
当 cdn = "source" 时,supernode 机器上的 nginx 服务是非必须的。而 dfget 请求 /peer/task 时返回的 PeerIP, PeerPort 分别是 supernodeIp,8001。这个时候是不需要对 supernodeIp:8001 进行检查的。
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Yes
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews