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: implement grpc client side sync pieces #1167

Merged
merged 5 commits into from
Mar 23, 2022

Conversation

jim3ma
Copy link
Member

@jim3ma jim3ma commented Mar 18, 2022

Signed-off-by: Jim Ma [email protected]

Description

  1. implement grpc client side sync pieces.
  2. fallback to get pieces grpc when some clients is old version which did not support sync pieces.

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

  • Code compiles correctly.
  • My code follows the code style of this project.
  • 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.
  • All new and existing tests passed.

@jim3ma jim3ma requested a review from a team as a code owner March 18, 2022 02:06
@jim3ma jim3ma requested review from bergwolf, ansinlee and hyy0322 March 18, 2022 02:06
@codecov-commenter
Copy link

Codecov Report

Merging #1167 (60553f4) into main (a27450c) will increase coverage by 0.25%.
The diff coverage is 53.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1167      +/-   ##
==========================================
+ Coverage   46.12%   46.38%   +0.25%     
==========================================
  Files         132      133       +1     
  Lines       10239    10472     +233     
==========================================
+ Hits         4723     4857     +134     
- Misses       4968     5061      +93     
- Partials      548      554       +6     
Flag Coverage Δ
Object-compatibility-e2etests ?
e2etests ?
unittests 46.38% <53.25%> (+0.25%) ⬆️

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

Impacted Files Coverage Δ
client/daemon/peer/peertask_piecetask_poller.go 53.33% <0.00%> (+2.98%) ⬆️
client/daemon/rpcserver/subscriber.go 49.56% <0.00%> (-9.81%) ⬇️
...ent/daemon/peer/peertask_piecetask_synchronizer.go 46.91% <46.91%> (ø)
client/daemon/peer/peertask_conductor.go 58.23% <72.34%> (+1.22%) ⬆️
client/daemon/peer/peertask_bitmap.go 72.22% <100.00%> (+3.47%) ⬆️
pkg/dfpath/dfpath.go 82.85% <0.00%> (+34.37%) ⬆️

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

@yxxhero yxxhero merged commit 7d44095 into main Mar 23, 2022
@yxxhero yxxhero deleted the feat/client-bidirection-fetch-pieces branch March 23, 2022 03:15
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
* feat: implement grpc client side sync pieces

Signed-off-by: Jim Ma <[email protected]>

* fix: client unit test

Signed-off-by: Jim Ma <[email protected]>

* chore: report sync piece error

Signed-off-by: Jim Ma <[email protected]>

* chore: optimize pieceTaskSyncManager cancel

Signed-off-by: Jim Ma <[email protected]>
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.

5 participants