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: concurrent multiple pieces back source #1426

Merged
merged 10 commits into from
Jul 4, 2022

Conversation

jim3ma
Copy link
Member

@jim3ma jim3ma commented Jul 1, 2022

Signed-off-by: Jim Ma majinjing3@gmail.com

Description

In some network environments, one tcp connection is limited to very low transfer speed like 2M/s.
Concurrent downloading is very useful for this scenario.

This PR make concurrent multiple pieces download configurable and disabled by default.

We need update documents after merged this PR.

Related Issue

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.

Signed-off-by: Jim Ma <majinjing3@gmail.com>
@jim3ma jim3ma requested a review from a team as a code owner July 1, 2022 06:46
Signed-off-by: Jim Ma <majinjing3@gmail.com>
Signed-off-by: Jim Ma <majinjing3@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2022

Codecov Report

Merging #1426 (d59168d) into main (2942808) will increase coverage by 0.42%.
The diff coverage is 56.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1426      +/-   ##
==========================================
+ Coverage   44.28%   44.71%   +0.42%     
==========================================
  Files         113      113              
  Lines       10198    10373     +175     
==========================================
+ Hits         4516     4638     +122     
- Misses       5230     5269      +39     
- Partials      452      466      +14     
Flag Coverage Δ
Object-compatibility-e2etests ?
e2etests ?
unittests 44.71% <56.54%> (+0.42%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/config/peerhost.go 32.37% <ø> (ø)
client/daemon/daemon.go 5.28% <0.00%> (-0.02%) ⬇️
client/util/types.go 0.00% <ø> (ø)
internal/util/util.go 87.50% <ø> (ø)
.../source/clients/httpprotocol/http_source_client.go 48.92% <0.00%> (-11.26%) ⬇️
pkg/source/source_client.go 1.65% <0.00%> (-0.11%) ⬇️
client/daemon/peer/piece_manager.go 53.74% <68.83%> (+6.11%) ⬆️
client/daemon/peer/peertask_conductor.go 57.14% <100.00%> (ø)
client/daemon/peer/peertask_piecetask_poller.go 47.10% <100.00%> (+16.66%) ⬆️
... and 1 more

Signed-off-by: Jim Ma <majinjing3@gmail.com>
Signed-off-by: Jim Ma <majinjing3@gmail.com>
Signed-off-by: Jim Ma <majinjing3@gmail.com>
Signed-off-by: Jim Ma <majinjing3@gmail.com>
gaius-qi
gaius-qi previously approved these changes Jul 4, 2022
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

Signed-off-by: Jim Ma <majinjing3@gmail.com>
Signed-off-by: Jim Ma <majinjing3@gmail.com>
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

@jim3ma jim3ma merged commit 3d235ba into main Jul 4, 2022
@jim3ma jim3ma deleted the feat/concurrent-multiple-pieces-back-source branch July 4, 2022 08:26
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
* feat: concurrent multiple pieces back source
* chore: update http source client

Signed-off-by: Jim Ma <majinjing3@gmail.com>
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.

None yet

4 participants