-
Notifications
You must be signed in to change notification settings - Fork 306
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: support to set piece length for preheat #3848
Conversation
28cbc51
to
dde3f38
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3848 +/- ##
==========================================
- Coverage 35.15% 35.12% -0.04%
==========================================
Files 337 337
Lines 39282 39284 +2
==========================================
- Hits 13811 13798 -13
- Misses 24571 24582 +11
- Partials 900 904 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: Gaius <[email protected]>
83f2bab
to
2f1f730
Compare
e85bd2d
to
c617434
Compare
…/piece-length Signed-off-by: Gaius <[email protected]>
c617434
to
70b1ace
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.
lgtm
Description
This pull request introduces the
PieceLength
parameter to various job management and scheduling functions, allowing for more granular control over piece lengths during file download tasks. This change affects multiple files and functions across the codebase, ensuring that thePieceLength
parameter is properly handled and propagated through the system.Key changes include:
Introduction of
PieceLength
Parameter:internal/job/types.go
: AddedPieceLength
to thePreheatRequest
struct.manager/types/job.go
: AddedPieceLength
toPreheatArgs
,GetTaskArgs
, andDeleteTaskArgs
. [1] [2] [3]Modification of TaskID Generation:
pkg/idgen/task_id.go
: UpdatedTaskIDV2
to includePieceLength
in the task ID generation process.pkg/idgen/task_id_test.go
: Added tests forTaskIDV2
to handlePieceLength
. [1] [2] [3] [4]Job Management Updates:
manager/job/preheat.go
: IncorporatedPieceLength
inCreatePreheat
andparseLayers
functions. [1] [2]manager/job/task.go
: UpdatedCreateGetTask
andCreateDeleteTask
to includePieceLength
in the task ID generation. [1] [2]Scheduler and Resource Updates:
scheduler/job/job.go
: Updatedpreheat
,preheatAllSeedPeers
,preheatAllPeers
, andpreheatV2
to handlePieceLength
. [1] [2] [3] [4]scheduler/resource/standard/task.go
: ChangedPieceLength
type inTask
struct and related functions. [1] [2]Test and Utility Updates:
scheduler/resource/standard/task_test.go
: Updated mock task ID generation to includePieceLength
.scheduler/scheduling/evaluator/evaluator_base_test.go
: Updated mock task ID generation to includePieceLength
.scheduler/scheduling/scheduling_test.go
: Updated mock task ID generation to includePieceLength
.scheduler/service/service_v1_test.go
: Updated mock task ID generation to includePieceLength
.scheduler/service/service_v2.go
: Updated task options to handlePieceLength
. [1] [2]test/e2e/v2/util/file.go
: UpdatedGetTaskID
to includePieceLength
.test/e2e/v2/util/task.go
: AddedPieceLength
to task ID struct and related functions. [1] [2]Related Issue
Motivation and Context
Screenshots (if appropriate)
Types of changes
Checklist