summaryrefslogtreecommitdiff
path: root/lib/spack/llnl/util/lock.py
AgeCommit message (Collapse)AuthorFilesLines
2016-08-09Move provider cache to home directory and refactor TransactionsTodd Gamblin1-2/+67
Major stuff: - Created a FileCache for managing user cache files in Spack. Currently just handles virtuals. - Moved virtual cache from the repository to the home directory so that users do not need write access to Spack repositories to use them. - Refactored `Transaction` class in `database.py` -- moved it to `LockTransaction` in `lock.py` and made it reusable by other classes. Other additions: - Added tests for file cache and transactions. - Added a few more tests for database - Fixed bug in DB where writes could happen even if exceptions were raised during a transaction. - `spack uninstall` now attempts to repair the database when it discovers that a prefix doesn't exist but a DB record does.
2016-05-11Correct LLNL LGPL license template for clarity.Todd Gamblin1-8/+8
2015-12-09Change github.com/scalability-llnl to github.com/llnl everywhere.Todd Gamblin1-1/+1
2015-10-27Fix stupid lock bug.Todd Gamblin1-16/+24
- Code simplification ignored case where exception was raised. - If LockError was raised, read and write counts were incremented erroneously. - updated lock test.
2015-10-27Lock acquires return True/False depending on whether they got POSIX lock.Todd Gamblin1-4/+15
2015-10-24Working Lock class, now uses POSIX fcntl locks, extensive unit test.Todd Gamblin1-83/+84
- llnl.util.lock now uses fcntl.lockf instead of flock - purported to have more NFS compatibility. - Added an extensive test case for locks. - tests acquiring, releasing, upgrading, timeouts, shared, & exclusive cases.
2015-09-17Simplify lock context managers.Todd Gamblin1-9/+21
2015-09-17Several changes to DB implementation.Todd Gamblin1-10/+17
1. Database stores a file version, so we can add to it in the future. 2. Database indexed by hashes and not numerical indexes. 3. Specs built by database have consistent hashes and it's checked. 4. minor naming and whitespace changes.
2015-08-31Fixed several issues from code reviewGregory Becker1-0/+136
Most importantly wrote the Lock, Read_Lock_Instance, and Write_Lock_Instance classes in lock.py Updated the locking in database.py TODO: Lock on larger areas