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

client: improve file checking on task start #5167

Merged
merged 7 commits into from
Mar 26, 2023
Merged

Conversation

davidpanderson
Copy link
Contributor

When a task starts:

  • don't re-checksum its files.
    This was already done after the file was downloaded.
    Doing it again doesn't accomplish anything,
    and causes performance problems if the file is big.
  • do check that the files exist and have the right size
  • if the program launch (e.g. exec()) fails,
    re-checksum the app version files on the (unlikely) chance
    that one of them was accidentally corrupted.

Fixes #5165

When a task starts:
- don't re-checksum its files.
    This was already done after the file was downloaded.
    Doing it again doesn't accomplish anything,
    and causes performance problems if the file is big.
- do check that the files exist and have the right size
- if the program launch (e.g. exec()) fails,
    re-checksum the app version files on the (unlikely) chance
    that one of them was accidentally corrupted.
Fix problem in boinc_stdio.h
@codecov
Copy link

codecov bot commented Mar 26, 2023

Codecov Report

Merging #5167 (2667361) into master (4db1c2b) will increase coverage by 0.01%.
The diff coverage is 33.33%.

❗ Current head 2667361 differs from pull request most recent head e252be6. Consider uploading reports for the commit e252be6 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5167      +/-   ##
============================================
+ Coverage     10.85%   10.86%   +0.01%     
  Complexity     1064     1064              
============================================
  Files           279      279              
  Lines         35992    35993       +1     
  Branches       8258     8258              
============================================
+ Hits           3907     3911       +4     
+ Misses        31693    31690       -3     
  Partials        392      392              
Impacted Files Coverage Δ
lib/str_util.cpp 57.92% <0.00%> (-0.10%) ⬇️
lib/boinc_stdio.h 20.00% <100.00%> (+8.00%) ⬆️

client/app_start.cpp Outdated Show resolved Hide resolved
client/app_start.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@BrianNixon BrianNixon left a comment

Choose a reason for hiding this comment

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

CLIENT_STATE::task_files_present(): Suggest mentioning the side-effect of check_size, otherwise it’s not obvious why the early returns get removed

client/cs_apps.cpp Outdated Show resolved Hide resolved
client/cs_apps.cpp Outdated Show resolved Hide resolved
client/cs_apps.cpp Outdated Show resolved Hide resolved
client/cs_files.cpp Outdated Show resolved Hide resolved
davidpanderson and others added 3 commits March 26, 2023 12:03
Co-authored-by: Brian Nixon <nixonb@yahoo.com>
@AenBleidd AenBleidd merged commit c0d4058 into master Mar 26, 2023
@AenBleidd AenBleidd deleted the dpa_file_check branch August 15, 2023 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of verify_files_on_app_start
3 participants