-
Notifications
You must be signed in to change notification settings - Fork 340
feat(persistentcache): add concurrent piece count option for peers #4315
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
base: main
Are you sure you want to change the base?
Conversation
f071b0a
to
41716e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds support for tracking concurrent piece count per peer in both standard and persistent cache peers, enabling clients to specify how many pieces can be downloaded simultaneously. It also updates dependencies for API and protobuf packages.
- Adds
ConcurrentPieceCount
field with default value and functional options for both peer types - Integrates concurrent piece count into peer storage/retrieval and RPC responses
- Updates dependencies (
d7y.io/api/v2
andgoogle.golang.org/protobuf
)
Reviewed Changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
scheduler/resource/standard/peer.go |
Adds ConcurrentPieceCount field and WithConcurrentPieceCount option to standard peers |
scheduler/resource/persistentcache/peer.go |
Adds ConcurrentPieceCount field and option support to persistent cache peers |
scheduler/resource/persistentcache/peer_manager.go |
Updates Redis storage to persist and retrieve concurrent piece count |
scheduler/service/service_v2.go |
Propagates concurrent piece count in RPC responses and peer creation |
scheduler/scheduling/scheduling.go |
Includes concurrent piece count in scheduling responses |
scheduler/resource/standard/peer_test.go |
Adds test coverage for concurrent piece count functionality |
scheduler/resource/persistentcache/peer_test.go |
Updates tests to validate concurrent piece count behavior |
scheduler/resource/persistentcache/peer_manager_test.go |
Updates manager tests with concurrent piece count assertions |
scheduler/service/service_v2_test.go |
Adds test fixtures for concurrent piece count validation |
scheduler/scheduling/scheduling_test.go |
Updates scheduling test to include concurrent piece count |
go.mod |
Updates API and protobuf dependencies to newer versions |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4315 +/- ##
==========================================
+ Coverage 32.62% 32.64% +0.01%
==========================================
Files 349 349
Lines 41411 41445 +34
==========================================
+ Hits 13509 13528 +19
- Misses 27023 27036 +13
- Partials 879 881 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Signed-off-by: Gaius <gaius.qi@gmail.com>
41716e4
to
e9536bb
Compare
Description
This pull request introduces support for tracking and configuring the number of pieces a peer can download concurrently (
ConcurrentPieceCount
) for both standard and persistent cache peers. It adds a default value, allows clients to specify this value, persists it in storage, and ensures it is properly propagated through the system. Additionally, the pull request updates dependencies ingo.mod
.Peer concurrency support
ConcurrentPieceCount
field to bothstandard.Peer
andpersistentcache.Peer
structs, with a default value and a new functional optionWithConcurrentPieceCount
to allow explicit configuration. [1] [2] [3] [4] [5] [6]ConcurrentPieceCount
and apply provided options. [1] [2] [3]ConcurrentPieceCount
for persistent cache peers. [1] [2] [3] [4] [5]API and service propagation
ConcurrentPieceCount
in RPC responses and peer construction, including handling client-provided values. [1] [2] [3] [4] [5] [6]Testing improvements
ConcurrentPieceCount
, including cases with default and explicit values. [1] [2] [3] [4] [5] [6] [7] [8] [9]Dependency updates
d7y.io/api/v2
fromv2.1.60
tov2.1.65
andgoogle.golang.org/protobuf
fromv1.36.7
tov1.36.8
ingo.mod
. [1] [2]Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist