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

fix: exception on concurrent download of ParseFile from multiple threads #1180

Merged
merged 6 commits into from
Aug 25, 2022

Conversation

rommansabbir
Copy link
Member

@rommansabbir rommansabbir commented Aug 23, 2022

New Pull Request Checklist

Issue Description

Related issue: #1155

Approach

This PR simplifies the logic of fetchAsync method and then adds a concurrent code that blocks the second (and further) calling threads until the first thread finishes the download of ParseFile (or fails to do so).

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)
  • A changelog entry is created automatically using the pull request title (do not manually add a changelog entry)

@parse-github-assistant
Copy link

parse-github-assistant bot commented Aug 23, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Aug 23, 2022

Codecov Report

Merging #1180 (ec87160) into master (351858c) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master   #1180   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files         122     122           
  Lines        9962    9971    +9     
  Branches     1343    1345    +2     
======================================
- Misses       9962    9971    +9     
Impacted Files Coverage Δ
...e/src/main/java/com/parse/ParseFileController.java 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rommansabbir rommansabbir changed the title fix - ci failing : exception on concurrent download of ParseFile from multiple threads | PR #1179 fix - ci failing : exception on concurrent download of ParseFile from multiple threads Aug 23, 2022
@rommansabbir rommansabbir changed the title fix - ci failing : exception on concurrent download of ParseFile from multiple threads fix (ci failing) : exception on concurrent download of ParseFile from multiple threads Aug 23, 2022
@rommansabbir
Copy link
Member Author

@mtrezza @L3K0V How to solve 'codecov/project' failing issue?

Copy link
Contributor

@azlekov azlekov left a comment

Choose a reason for hiding this comment

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

LGTM

@azlekov
Copy link
Contributor

azlekov commented Aug 23, 2022

@mtrezza can you help about failing checks

@mtrezza mtrezza changed the title fix (ci failing) : exception on concurrent download of ParseFile from multiple threads fix: exception on concurrent download of ParseFile from multiple threads Aug 25, 2022
@mtrezza mtrezza changed the title fix: exception on concurrent download of ParseFile from multiple threads fix: exception on concurrent download of ParseFile from multiple threads Aug 25, 2022
@mtrezza mtrezza changed the title fix: exception on concurrent download of ParseFile from multiple threads fix: exception on concurrent download of ParseFile from multiple threads Aug 25, 2022
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good!

@mtrezza mtrezza merged commit 44b1914 into parse-community:master Aug 25, 2022
@mtrezza mtrezza linked an issue Aug 25, 2022 that may be closed by this pull request
4 tasks
parseplatformorg pushed a commit that referenced this pull request Aug 26, 2022
# [4.1.0](4.0.0...4.1.0) (2022-08-26)

### Bug Fixes

* exception on concurrent download of `ParseFile` from multiple threads ([#1180](#1180)) ([44b1914](44b1914))

### Features

* upgrade various dependencies ([#1181](#1181)) ([c455f4a](c455f4a))
@parseplatformorg
Copy link

🎉 This change has been released in version 4.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when fetching ParseFile for the second time
5 participants