summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2016-10-06 01:31:31 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2016-10-11 01:55:33 -0700
commit222f551c37fc5411ddce5dccb87dc477b0a02ae4 (patch)
tree3ea0405606bbec110fe52b4bbc9961efe62c3116 /bin
parent080a78664e18e39e6f47f92a39102c7f5799e392 (diff)
downloadspack-222f551c37fc5411ddce5dccb87dc477b0a02ae4.tar.gz
spack-222f551c37fc5411ddce5dccb87dc477b0a02ae4.tar.bz2
spack-222f551c37fc5411ddce5dccb87dc477b0a02ae4.tar.xz
spack-222f551c37fc5411ddce5dccb87dc477b0a02ae4.zip
Use a single lock file for stages and a single file for prefixes.
- Locks now use fcntl range locks on a single file. How it works for prefixes: - Each lock is a byte range lock on the nth byte of a file. - The lock file is ``spack.installed_db.prefix_lock`` -- the DB tells us what to call it and it lives alongside the install DB. n is the sys.maxsize-bit prefix of the DAG hash. For stages, we take the sha1 of the stage name and use that to select a byte to lock. With 100 concurrent builds, the likelihood of a false lock collision is ~5.36e-16, so this scheme should retain more than sufficient paralellism (with no chance of false negatives), and get us reader-writer lock semantics with a single file, so no need to clean up lots of lock files.
Diffstat (limited to 'bin')
0 files changed, 0 insertions, 0 deletions