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

Made the parallel downloads go routines running without synchronization #2287

Merged
merged 18 commits into from
Aug 12, 2024

Conversation

vadlakondaswetha
Copy link
Collaborator

@vadlakondaswetha vadlakondaswetha commented Aug 6, 2024

Description

Incase of parallel downloads, we trigger n number of goroutines each downloading xMB and then we wait for xnMB to be downloaded and then make the goroutines fetch another xnMB.
Instead of that, we are making each goroutine continuously download xMB and then next xMB instead of worrying about other goroutines. Which offset to fetch will be passed via channel,.

Link to the issue in case of a bug fix.

NA

Testing details

  1. Manual - Done
  2. Unit tests - Existing tests are sufficient
  3. Integration tests - Fixed as required.

@vadlakondaswetha vadlakondaswetha added the execute-integration-tests Run only integration tests label Aug 6, 2024
Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.65%. Comparing base (b2286ec) to head (2e4d17d).
Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2287      +/-   ##
==========================================
+ Coverage   71.23%   79.65%   +8.42%     
==========================================
  Files         106      106              
  Lines       11555    11601      +46     
==========================================
+ Hits         8231     9241    +1010     
+ Misses       2969     1923    -1046     
- Partials      355      437      +82     
Flag Coverage Δ
unittests 79.65% <100.00%> (+8.42%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vadlakondaswetha vadlakondaswetha marked this pull request as ready for review August 8, 2024 09:28
@vadlakondaswetha vadlakondaswetha requested a review from a team as a code owner August 8, 2024 09:28
@kislaykishore kislaykishore requested review from a team and kislaykishore and removed request for a team August 8, 2024 09:28
@vadlakondaswetha vadlakondaswetha changed the title made the parallel go routines running without synchronization Made the parallel downloads go routines running without synchronization Aug 8, 2024
# Conflicts:
#	internal/cache/file/downloader/parallel_downloads_job.go
# Conflicts:
#	internal/cache/file/downloader/jm_parallel_downloads_test.go
# Conflicts:
#	internal/cache/file/downloader/jm_parallel_downloads_test.go
sethiay
sethiay previously approved these changes Aug 12, 2024
internal/cache/file/downloader/job.go Outdated Show resolved Hide resolved
internal/cache/file/downloader/parallel_downloads_job.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@kislaykishore kislaykishore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't reviewed the logic. Just looked at it from a readability angle.

internal/cache/file/downloader/parallel_downloads_job.go Outdated Show resolved Hide resolved
internal/cache/data/object_range.go Outdated Show resolved Hide resolved
internal/cache/file/downloader/parallel_downloads_job.go Outdated Show resolved Hide resolved
sethiay
sethiay previously approved these changes Aug 12, 2024
sethiay
sethiay previously approved these changes Aug 12, 2024
@kislaykishore kislaykishore self-requested a review August 12, 2024 10:15
kislaykishore
kislaykishore previously approved these changes Aug 12, 2024
internal/cache/data/object_range.go Show resolved Hide resolved
@vadlakondaswetha vadlakondaswetha merged commit 03ae025 into master Aug 12, 2024
12 of 14 checks passed
Tulsishah pushed a commit that referenced this pull request Aug 13, 2024
…on (#2287)

* made the parallel go routines running without synchronization

# Conflicts:
#	internal/cache/file/downloader/parallel_downloads_job.go

* added print statement

* fixing tests

# Conflicts:
#	internal/cache/file/downloader/jm_parallel_downloads_test.go

* added changes to update the marker file

* reverting the test change

* fixing the test

* Fixing the integration tests

* Fixing the test

* releasign the goroutine

* fixing tests

# Conflicts:
#	internal/cache/file/downloader/jm_parallel_downloads_test.go

* Code review comments

* comments fixed

* Added unit tests for updateRangeMap method

* code review comments

* code review comments

* changed to require

* code review comments

* adding comment for public struct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-integration-tests Run only integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants