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

Package Cache lock cleanup #1745

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Conversation

dotasek
Copy link
Collaborator

@dotasek dotasek commented Sep 13, 2024

The creation of .lock files in order to protect the package cache from multiple processes (not just threads from within the same JVM) was incorrectly implemented, resulting in unlocked files being prematurely generated with no checks being done for incomplete package installs

The changes here should solve the following:

  • .lock files should be generated, and the current process ID should be written to them while locked.
  • There should be a mechanism to time out when lock files are not removed in a timely fashion.
  • For testing and general flexibility, timeouts for locking should be implemented, and identifiable exceptions should be thrown.
  • There should be a mechanism for identifying package cache installs that are incomplete (.lock files without a process lock)
  • There should be a mechanism to clean up incomplete package cache installs on package cache instantiation.

Some nice-to-have functionality:

  • Cleanup for incomplete package cache installs when they are detected after the cache is instantiated.

@dotasek dotasek marked this pull request as ready for review September 18, 2024 20:11
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 12.66%. Comparing base (ded7bc0) to head (d570085).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1745   +/-   ##
=========================================
  Coverage     12.66%   12.66%           
- Complexity    32731    32735    +4     
=========================================
  Files          2204     2204           
  Lines        674191   674235   +44     
  Branches     198751   198763   +12     
=========================================
+ Hits          85358    85392   +34     
- Misses       558646   558651    +5     
- Partials      30187    30192    +5     

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant